class DeviceCodeGrant extends DeviceCodeGrant

Traits

Properties

protected bool $includeVerificationUriComplete

Methods

ClientEntityInterface
validateClient(ServerRequestInterface $request)

Authenticate the client before checking its permitted grants.

__construct(DeviceCodeRepositoryInterface $deviceCodeRepository, RefreshTokenRepositoryInterface $refreshTokenRepository, DateInterval $deviceCodeTTL, UrlGenerator $url, int $retryInterval = 5)

Create a device code grant with request-derived verification URLs.

DeviceCodeResponse
respondToDeviceAuthorizationRequest(ServerRequestInterface $request)

Authenticate the client and apply its scope ceiling before creating a device authorization.

void
setIncludeVerificationUriComplete(bool $includeVerificationUriComplete)

Configure whether device responses include the complete verification URI.

AccessTokenEntityInterface
issueAccessToken(DateInterval $accessTokenTTL, ClientEntityInterface $client, string|null $userIdentifier, array $scopes = [])

Claim the validated device code before issuing its token.

DeviceCodeEntityInterface
issueDeviceCode(DateInterval $deviceCodeTTL, ClientEntityInterface $client, string $verificationUri, array $scopes = [])

Issue a device code using the current request's verification URL.

Details

protected ClientEntityInterface validateClient(ServerRequestInterface $request)

Authenticate the client before checking its permitted grants.

Parameters

ServerRequestInterface $request

Return Value

ClientEntityInterface

at line 32
__construct(DeviceCodeRepositoryInterface $deviceCodeRepository, RefreshTokenRepositoryInterface $refreshTokenRepository, DateInterval $deviceCodeTTL, UrlGenerator $url, int $retryInterval = 5)

Create a device code grant with request-derived verification URLs.

Parameters

DeviceCodeRepositoryInterface $deviceCodeRepository
RefreshTokenRepositoryInterface $refreshTokenRepository
DateInterval $deviceCodeTTL
UrlGenerator $url
int $retryInterval

at line 45
DeviceCodeResponse respondToDeviceAuthorizationRequest(ServerRequestInterface $request)

Authenticate the client and apply its scope ceiling before creating a device authorization.

Parameters

ServerRequestInterface $request

Return Value

DeviceCodeResponse

at line 98
void setIncludeVerificationUriComplete(bool $includeVerificationUriComplete)

Configure whether device responses include the complete verification URI.

On the worker-shared grant, the flag affects subsequent requests.

Parameters

bool $includeVerificationUriComplete

Return Value

void

at line 111
protected AccessTokenEntityInterface issueAccessToken(DateInterval $accessTokenTTL, ClientEntityInterface $client, string|null $userIdentifier, array $scopes = [])

Claim the validated device code before issuing its token.

Parameters

DateInterval $accessTokenTTL
ClientEntityInterface $client
string|null $userIdentifier
array $scopes

Return Value

AccessTokenEntityInterface

at line 129
protected DeviceCodeEntityInterface issueDeviceCode(DateInterval $deviceCodeTTL, ClientEntityInterface $client, string $verificationUri, array $scopes = [])

Issue a device code using the current request's verification URL.

Parameters

DateInterval $deviceCodeTTL
ClientEntityInterface $client
string $verificationUri
array $scopes

Return Value

DeviceCodeEntityInterface