OAuthSession constructor
OAuthSession({})
Creates an OAuth session with DPoP support.
All parameters are required as per OAuth 2.0 DPoP specifications.
Parameters:
- accessToken: JWT access token bound to the DPoP proof
- refreshToken: JWT refresh token for access token renewal
- tokenType: Must be 'DPoP' as per RFC 9449
- scope: Space-delimited OAuth 2.0 scopes
- expiresAt: Token expiration timestamp
- sub: Subject identifier for token binding
- $dPoPNonce: Server-provided nonce for DPoP proof freshness
- $publicKey: Base64URL encoded public key for DPoP proof verification
- $privateKey: Base64URL encoded private key for DPoP proof generation
Implementation
OAuthSession({
required this.accessToken,
required this.refreshToken,
required this.tokenType,
required this.scope,
required this.expiresAt,
required this.sub,
required this.$dPoPNonce,
required this.$publicKey,
required this.$privateKey,
});