Added missing bits of documentation.
This commit is contained in:
parent
6b38e3327e
commit
d02394f8de
2 changed files with 57 additions and 0 deletions
|
@ -26,26 +26,56 @@ final class OAuth2AuthorizationRequest {
|
|||
private readonly int $interval
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Gets device code, meant to be sent to the server.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDeviceCode(): string {
|
||||
return $this->deviceCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets user code, meant to be entered by the user.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getUserCode(): string {
|
||||
return $this->userCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the verification page URI, without autofill.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getVerificationUri(): string {
|
||||
return $this->verificationUri;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the verification page URI, with autofill.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getVerificationUriComplete(): string {
|
||||
return $this->verificationUriComplete;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets amount of seconds in which this authorisation requests will expire.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getExpiresIn(): int {
|
||||
return $this->expiresIn;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets amount of seconds at which interval we're meant to poll at.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getInterval(): int {
|
||||
return $this->interval;
|
||||
}
|
||||
|
|
|
@ -24,22 +24,49 @@ final class OAuth2Token {
|
|||
private readonly string $refreshToken
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Gets OAuth2 access token.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getAccessToken(): string {
|
||||
return $this->accessToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets OAuth2 token type.
|
||||
*
|
||||
* Always 'Bearer' unless something crazy happens in the future.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTokenType(): string {
|
||||
return $this->tokenType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets amount of seconds in which the access token expires.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getExpiresIn(): int {
|
||||
return $this->expiresIn;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets possible alternate scope than what was initially requested by the application, empty if unchanged.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getScope(): string {
|
||||
return $this->scope;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets refresh token used to request a new access token.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getRefreshToken(): string {
|
||||
return $this->refreshToken;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue