ExchangedToken
in package
The result of an RFC 8693 exchange (wire schema `TokenExchangeResponse`, CONTRACT.md §15.1).
There is no $refreshToken property, and that is deliberate (§15.2 rule 4).
RFC 8693 issues none, so this type cannot represent one: an application that wants a
fresh exchanged token re-runs the exchange. This result also never enters the §9
single-flight refresh guard — there is nothing to refresh.
Table of Contents
Properties
- $accessToken : Sensitive
- $expiresIn : int
- $issuedTokenType : string
- $scope : string|null
- $tokenType : string
Methods
- __construct() : mixed
Properties
$accessToken read-only
public
Sensitive
$accessToken
$expiresIn read-only
public
int
$expiresIn
$issuedTokenType read-only
public
string
$issuedTokenType
$scope read-only
public
string|null
$scope
$tokenType read-only
public
string
$tokenType
Methods
__construct()
public
__construct(Sensitive $accessToken, string $issuedTokenType, string $tokenType, int $expiresIn, string|null $scope) : mixed
Parameters
- $accessToken : Sensitive
-
The issued token (§15.5 secret).
- $issuedTokenType : string
-
What the server actually issued. Mandatory in RFC 8693 §2.2.1 and surfaced rather than dropped (§15.2 rule 6), so a client that asked for one type and got another can tell.
- $tokenType : string
-
The token type (
Bearer). - $expiresIn : int
-
Lifetime in seconds — never longer than the subject token's remaining life.
- $scope : string|null
-
The granted scope, which may be narrower than requested even on success (§15.2 rule 7); read it rather than assuming the request was honoured verbatim.