ClientCredentialsResponse class

Represents the response data model for the client credentials flow.

This model contains the access token, token type, expiration time, and subject identifier.

Annotations
  • @immutable

Constructors

ClientCredentialsResponse({required String accessToken, required String tokenType, required int expiresIn, required String sub})
Creates an instance of ClientCredentialsResponse.
const
ClientCredentialsResponse.fromJson(Map<String, dynamic> json)
Creates an instance of ClientCredentialsResponse from a JSON map.
factory
ClientCredentialsResponse.fromRawJson(String str)
Creates an instance of ClientCredentialsResponse from a JSON string.
factory

Properties

accessToken String
The access token issued by the authorization server.
final
expiresIn int
The duration in seconds for which the access token is valid.
final
hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sub String
The subject (sub) identifier, representing the client.
final
tokenType String
The type of the token issued, typically "Bearer".
final

Methods

copyWith({String? accessToken, String? tokenType, int? expiresIn, String? sub}) ClientCredentialsResponse
Returns a copy of this instance with the given fields replaced by new values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts this instance to a JSON map.
toRawJson() String
Converts this instance to a JSON string.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override