FrappeOAuthClient class

Main client for Frappe OAuth2 authentication

Provides a complete OAuth2 authentication flow including:

  • Authorization code flow with PKCE
  • Token exchange and refresh
  • User information retrieval
  • Session management

Constructors

FrappeOAuthClient({required OAuthConfig config, NetworkService? networkService})

Properties

config OAuthConfig
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Disposes of resources
getAccessToken() String?
Gets the current access token
getCurrentUser() UserInfo?
Gets the current user information
isAuthenticated() bool
Checks if the user is currently authenticated
login() Future<AuthResult>
Initiates the OAuth2 login flow
logout() Future<void>
Logs out the current user
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
refreshToken() Future<TokenResponse>
Refreshes the current access token using the refresh token
toString() String
A string representation of this object.
inherited

Operators

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