LenraOauth2Helper class

A class that represents a Lenra OAuth2 client.

Inheritance
  • Object
  • OAuth2Helper
  • LenraOauth2Helper

Constructors

LenraOauth2Helper.new({required String baseUri, required String redirectUri, required String clientId, required String customUriScheme, String? clientSecret, List<String> scopes = const []})
Creates the helper usable to refresh the OAuth2 token.

Properties

accessTokenHeaders Map<String, String>?
getter/setter pairinherited
accessTokenParams Map<String, dynamic>?
getter/setter pairinherited
afterAuthorizationCodeCb Function?
getter/setter pairinherited
authCodeParams Map<String, dynamic>?
getter/setter pairinherited
baseUri String
getter/setter pair
client → OAuth2Client
finalinherited
clientId String
getter/setter pairinherited
clientSecret String?
getter/setter pairinherited
enablePKCE bool
getter/setter pairinherited
enableState bool
getter/setter pairinherited
grantType int
getter/setter pairinherited
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>?
getter/setter pairinherited
tokenStorage ↔ TokenStorage
getter/setter pairinherited
webAuthClient ↔ BaseWebAuth?
getter/setter pairinherited
webAuthOpts Map<String, dynamic>?
getter/setter pairinherited

Methods

delete(String url, {Map<String, String>? headers, Client? httpClient}) Future<Response>
Performs a DELETE request to the specified url, adding the authorization token.
inherited
disconnect({dynamic httpClient}) Future<OAuth2Response>
Revokes the previously fetched token
override
fetchToken() Future<AccessTokenResponse>
Fetches a new token and saves it in the storage
inherited
get(String url, {Map<String, String>? headers, Client? httpClient}) Future<Response>
Performs a GET request to the specified url, adding the authorization token.
inherited
getToken() Future<AccessTokenResponse?>
Returns a previously required token, if any, or requires a new one.
inherited
getTokenFromStorage() Future<AccessTokenResponse?>
Returns the previously stored Access Token from the storage, if any
inherited
Performs a HEAD request to the specified url, adding the authorization token.
inherited
isAuthenticated() Future<bool>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
patch(String url, {Map<String, String>? headers, dynamic body, Client? httpClient}) Future<Response>
Performs a PATCH request to the specified url, adding the authorization token.
inherited
post(String url, {Map<String, String>? headers, dynamic body, Client? httpClient}) Future<Response>
Performs a POST request to the specified url, adding the authorization token.
inherited
put(String url, {Map<String, String>? headers, dynamic body, Client? httpClient}) Future<Response>
Performs a PUT request to the specified url, adding the authorization token.
inherited
refreshToken(AccessTokenResponse curTknResp) Future<AccessTokenResponse>
Performs a refresh_token request using the refreshToken.
inherited
removeAllTokens() Future
inherited
toString() String
A string representation of this object.
inherited

Operators

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