class Client implements ClientEntityInterface, JsonSerializable (View source)

Constants

CONSENT_NONE

Disable the users ability to allow / deny consent for this client to access details.

This should only be used if a client is fully trusted and owned by this server

CONSENT_SIMPLE

Give the user the option to allow or deny access without changing scopes

Properties

protected $identifier
protected string $name
protected string|string[] $redirectUri
protected string $clientKey
protected string $clientSecret
protected bool $documentationEnabled
protected bool $hasCustomScopes
protected $scopes
protected int $consentType

The type of consent this client must get from the user

Methods

__construct()

Client constructor.

getIdentifier()

{@inheritdoc}

setIdentifier(string $identifier)

Set the client's identifier.

isConfidential()

No description

getName()

{@inheritdoc}

setName(string $name)

Set the client's name.

string
getClientKey()

No description

setClientKey(string $clientKey)

No description

string
getClientSecret()

No description

setClientSecret(string $clientSecret)

No description

string|null
getSpecifiedRedirectUri()

Returns the actual redirect URI bound to the entity. This is a string (sometimes containing a | to explode into multiple.) We have a separate method because the getRedirectUri method below actually splits piped strings into arrays, and it also appends the Swagger UI doc redirectUri if docs are enabled on the client.

getRedirectUri()

{@inheritdoc}

setRedirectUri(string|string[] $redirectUri)

Set the registered redirect URI (as a string), or an indexed array of redirect URIs.

int
getConsentType()

Get the consent type required by this client

setConsentType(int $consentType)

Set the level of consent this client must receive from the authenticating user

bool
isDocumentationEnabled()

No description

void
setDocumentationEnabled(bool $documentationEnabled)

No description

bool
hasCustomScopes()

No description

void
setHasCustomScopes(bool $hasCustomScopes)

No description

ArrayCollection
getScopes()

No description

void
setScopes($scopes)

No description

jsonSerialize()

No description

Details

__construct()

Client constructor.

getIdentifier()

{@inheritdoc}

See also

\League\OAuth2\Server\Entities\ClientEntityInterface::getIdentifier()

setIdentifier(string $identifier)

Set the client's identifier.

Parameters

string $identifier

isConfidential()

No description

getName()

{@inheritdoc}

See also

\League\OAuth2\Server\Entities\ClientEntityInterface::getName()

setName(string $name)

Set the client's name.

Parameters

string $name

string getClientKey()

No description

Return Value

string

setClientKey(string $clientKey)

No description

Parameters

string $clientKey

string getClientSecret()

No description

Return Value

string

setClientSecret(string $clientSecret)

No description

Parameters

string $clientSecret

string|null getSpecifiedRedirectUri()

Returns the actual redirect URI bound to the entity. This is a string (sometimes containing a | to explode into multiple.) We have a separate method because the getRedirectUri method below actually splits piped strings into arrays, and it also appends the Swagger UI doc redirectUri if docs are enabled on the client.

Return Value

string|null

getRedirectUri()

{@inheritdoc}

See also

\League\OAuth2\Server\Entities\ClientEntityInterface::getRedirectUri()

setRedirectUri(string|string[] $redirectUri)

Set the registered redirect URI (as a string), or an indexed array of redirect URIs.

Parameters

string|string[] $redirectUri

int getConsentType()

Get the consent type required by this client

Return Value

int

Client::CONSENT_SIMPLE | Client::CONSENT_NONE

setConsentType(int $consentType)

Set the level of consent this client must receive from the authenticating user

Parameters

int $consentType

Client::CONSENT_SIMPLE | Client::CONSENT_NONE

bool isDocumentationEnabled()

No description

Return Value

bool

void setDocumentationEnabled(bool $documentationEnabled)

No description

Parameters

bool $documentationEnabled

Return Value

void

bool hasCustomScopes()

No description

Return Value

bool

void setHasCustomScopes(bool $hasCustomScopes)

No description

Parameters

bool $hasCustomScopes

Return Value

void

ArrayCollection getScopes()

No description

Return Value

ArrayCollection

void setScopes($scopes)

No description

Parameters

$scopes

Return Value

void

jsonSerialize()

No description