AuthorizerImpl class

Inheritance

Constructors

AuthorizerImpl(Config config, {required StorageRepo storageRepo, SSLRepo? sslRepository, Client? baseClient, Duration? timeout, Uint8List? encryptionKey, bool? clearOnFreshInstall, required ConfigChangeStrategy configChangeStrategy})

Properties

authCodeGrant ↔ AuthorizationCodeGrant?
Internal representation of the OAuth flow.
getter/setter pairinherited
authStates Stream<AuthState>
Returns the stream of authorization states.
no setterinherited
clearOnFreshInstall bool
Whether to clear previous Keychain items on a fresh install.
finalinherited
config Config
The configuration for this authorizer. This may be updated throughout the OAuth flow as new information is available.
finalinherited
configChangeStrategy ConfigChangeStrategy
The strategy to use when FTAuth is initialized with a new, conflicting configuration (client ID).
finalinherited
currentState AuthState
The current auth state.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
httpClient → Client
Handles internal HTTP requests.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
storageRepo StorageRepo
Stores client-sensitive information related to the OAuth flow. Must be persistent, so that state can be recovered on startup.
finalinherited

Methods

addState(AuthState state) → void
Adds the state to the stream and caches it.
inherited
authorize({String? language, String? countryCode}) Future<String>
Initiates the authorization code flow.
inherited
exchange(Map<String, String> parameters) Future<Client>
Performs the second part of the authorization code flow, exhanging the parameters retrieved via the WebView with the OAuth server for an access and refresh token.
inherited
getAuthorizationUrl({String? language, String? countryCode, Uri? redirectUri}) Future<String>
Returns the URL to direct the user to via a WebView.
inherited
handleExchange(Map<String, String> parameters) Future<AuthSignedIn>
inherited
init() Future<void>
Initializes the SDK.
inherited
isPinning(String host) bool
Returns true if the repository is currently pinning for host.
inherited
launchUrl(String url) Future<void>
Launches the given URL.
override
login({String? language, String? countryCode}) Future<void>
Performs the full two-step OAuth process.
override
logout({bool deinit = false}) Future<void>
Logs out the current user.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onFoundState({required String state, required String codeVerifier}) Future<AuthState>
Called when FTAuth initializes and a previous state and codeVerifier were found in storage. This generally means we are returning from a login or have stale info which should be cleared.
inherited
pinCert(Certificate certificate) → void
Creates a strict pinning to the given certificate for a particular host.
inherited
refreshAuthState() Future<void>
Pull the latest auth state from the keychain. If, for example, an app extension or another window changed it, we may not have the latest.
inherited
toString() String
A string representation of this object.
inherited

Operators

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