OAuth2Configuration class
This class represents the configuration for an OAuth2 server. It contains the client ID, authorization endpoint, token endpoint, secret, and scopes required for authentication. And contains the methods fromJson,toJson for fetching and sending data.
Constructors
-
OAuth2Configuration({required String clientID, required String authorizationEndpoint, required String tokenEndpoint, String? clientSecret, required List<
String> scopes}) -
OAuth2Configuration.fromJson(Map<
String, dynamic> json) -
factory
Properties
-
The endpoint for obtaining authorization from the user. This is the endpoint where the user is redirected to grant permission for the client to access their resources.
final
- clientID → String
-
The client ID for the OAuth2 server. This is a unique identifier for the client that is provided by the server.
final
- clientSecret → String?
-
The client secret for the OAuth2 server. This is a secret key that is used to authenticate the client when requesting access tokens.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
scopes
→ List<
String> -
The scopes that the client is requesting. Scopes define the level of access that the client is requesting to the user's resources.
final
- tokenEndpoint → String
-
The endpoint for obtaining access tokens. This is the endpoint where the client can exchange the authorization grant for an access token that can be used to access protected resources.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited