AuthenticationService class

The authentication service handles all the logic of requesting auth token from the Square APIs.

Constructors

AuthenticationService({required String clientId, required String clientSecret, required String authorizationEndpoint, required String tokenEndpoint, required String revocationEndpoint})

Properties

authorizationEndpoint String
final
clientId String
final
clientSecret String
final
hashCode int
The hash code for this object.
no setterinherited
revocationEndpoint String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tokenEndpoint String
final

Methods

getAuthorizationPageUrl({required List<Scope> scopes, required String state}) String
Returns an authorization URL to be used in a web for to allow the user to authorize the application.
getAuthToken({required String code, required String redirectUrl}) Future<TokenResponse>
Obtains the access token from the authorization code.
getCachedToken() TokenResponse?
Returns the cached token if available
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
refreshToken({String refreshToken = ""}) Future<TokenResponse>
Refreshes the authorization token.
toString() String
A string representation of this object.
inherited

Operators

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