Nextcloud PHP API (master)

ICapabilityAwareOCMProvider extends IOCMProvider

Version 1.1 and 1.2 extensions to the Open Cloud Mesh Discovery API

Tags
link
https://github.com/cs3org/OCM-API/
since
32.0.0

Table of Contents

Methods

addResourceType()  : $this
add a single resource to the object
createNewResourceType()  : IOCMResource
create a new resource to later add it with {@see addResourceType()}
extractProtocolEntry()  : string
extract a specific string value from the listing of protocols, based on resource-name and protocol-name
getApiVersion()  : string
returns API version
getCapabilities()  : OCMCapabilities
get the capabilities advertised by this provider
getEndPoint()  : string
get configured endpoint
getInviteAcceptDialog()  : string
returns the invite accept dialog
getJwksUri()  : string
get the URL of the JWK Set document (RFC 7517) containing the public keys this OCM provider uses for HTTP Message Signatures (RFC 9421)
getProvider()  : string
get the provider name
getResourceTypes()  : array<string|int, IOCMResource>
get all set resources
getTokenEndPoint()  : string
get the token endpoint URL
hasCapability()  : bool
return if provider supports $capability
import()  : $this
import data from an array
isEnabled()  : bool
is set as enabled ?
jsonSerialize()  : array{enabled: bool, apiVersion: "1.0-proposal1", endPoint: string, publicKey?: array{keyId: string, publicKeyPem: string}, resourceTypes: list, protocols: array}>, version: string, jwksUri?: string}
setApiVersion()  : $this
get set API Version
setCapabilities()  : $this
set the capabilities
setEnabled()  : $this
enable OCM
setEndPoint()  : $this
configure endpoint
setInviteAcceptDialog()  : $this
set the invite accept dialog
setJwksUri()  : $this
set the URL of the JWK Set document (RFC 7517) containing the public keys this OCM provider uses for HTTP Message Signatures (RFC 9421).
setResourceTypes()  : $this
set resources
setTokenEndPoint()  : $this
set the token endpoint URL

Methods

addResourceType()

add a single resource to the object

public addResourceType(IOCMResource $resource) : $this
Parameters
$resource : IOCMResource
Tags
since
28.0.0
Return values
$this

createNewResourceType()

create a new resource to later add it with {@see addResourceType()}

public createNewResourceType() : IOCMResource
Tags
since
28.0.0
Return values
IOCMResource

extractProtocolEntry()

extract a specific string value from the listing of protocols, based on resource-name and protocol-name

public extractProtocolEntry(string $resourceName, string $protocol) : string
Parameters
$resourceName : string
$protocol : string
Tags
throws
OCMArgumentException
since
28.0.0
Return values
string

getApiVersion()

returns API version

public getApiVersion() : string
Tags
since
28.0.0
Return values
string

getEndPoint()

get configured endpoint

public getEndPoint() : string
Tags
since
28.0.0
Return values
string

getInviteAcceptDialog()

returns the invite accept dialog

public getInviteAcceptDialog() : string
Tags
since
33.0.0
Return values
string

getJwksUri()

get the URL of the JWK Set document (RFC 7517) containing the public keys this OCM provider uses for HTTP Message Signatures (RFC 9421)

public getJwksUri() : string
Tags
since
35.0.0
Return values
string

empty string if not advertised

getProvider()

get the provider name

public getProvider() : string
Tags
since
33.0.0
Return values
string

getTokenEndPoint()

get the token endpoint URL

public getTokenEndPoint() : string
Tags
since
32.0.0
Attributes
#[Override]
Return values
string

hasCapability()

return if provider supports $capability

public hasCapability(string $capability) : bool
Parameters
$capability : string
Tags
since
33.0.0
Return values
bool

import()

import data from an array

public import(array<string, int|string|bool|array<string|int, mixed>> $data) : $this
Parameters
$data : array<string, int|string|bool|array<string|int, mixed>>
Tags
throws
OCMProviderException

in case a descent provider cannot be generated from data

since
28.0.0
Return values
$this

isEnabled()

is set as enabled ?

public isEnabled() : bool
Tags
since
28.0.0
Return values
bool

jsonSerialize()

public jsonSerialize() : array{enabled: bool, apiVersion: "1.0-proposal1", endPoint: string, publicKey?: array{keyId: string, publicKeyPem: string}, resourceTypes: list, protocols: array}>, version: string, jwksUri?: string}
Tags
since
28.0.0
Attributes
#[Override]
Return values
array{enabled: bool, apiVersion: "1.0-proposal1", endPoint: string, publicKey?: array{keyId: string, publicKeyPem: string}, resourceTypes: list, protocols: array}>, version: string, jwksUri?: string}

setApiVersion()

get set API Version

public setApiVersion(string $apiVersion) : $this
Parameters
$apiVersion : string
Tags
since
28.0.0
Return values
$this

setCapabilities()

set the capabilities

public setCapabilities(array<string|int, mixed> $capabilities) : $this
Parameters
$capabilities : array<string|int, mixed>
Tags
since
33.0.0
Return values
$this

setEnabled()

enable OCM

public setEnabled(bool $enabled) : $this
Parameters
$enabled : bool
Tags
since
28.0.0
Return values
$this

setEndPoint()

configure endpoint

public setEndPoint(string $endPoint) : $this
Parameters
$endPoint : string
Tags
since
28.0.0
Return values
$this

setInviteAcceptDialog()

set the invite accept dialog

public setInviteAcceptDialog(string $inviteAcceptDialog) : $this
Parameters
$inviteAcceptDialog : string
Tags
since
33.0.0
Return values
$this

setJwksUri()

set the URL of the JWK Set document (RFC 7517) containing the public keys this OCM provider uses for HTTP Message Signatures (RFC 9421).

public setJwksUri(string $jwksUri) : $this

MUST use https when the http-sig capability is advertised.

Parameters
$jwksUri : string
Tags
since
35.0.0
Return values
$this

setResourceTypes()

set resources

public setResourceTypes(array<string|int, IOCMResource$resourceTypes) : $this
Parameters
$resourceTypes : array<string|int, IOCMResource>
Tags
since
28.0.0
Return values
$this

setTokenEndPoint()

set the token endpoint URL

public setTokenEndPoint(string $endPoint) : $this
Parameters
$endPoint : string
Tags
since
32.0.0
Attributes
#[Override]
Return values
$this
On this page

Search results