OAuthSession constructor

OAuthSession({
  1. required String accessToken,
  2. required String refreshToken,
  3. required String tokenType,
  4. required String scope,
  5. required DateTime expiresAt,
  6. required String sub,
  7. required String $dPoPNonce,
  8. required String $publicKey,
  9. required String $privateKey,
})

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,
});