AuthServices class
Global configuration for auth providers that are exposed through endpoints. This object is also used to manage the lifecycle of authentication tokens regardless of who issues the token.
Constructors
-
AuthServices({required TokenManagerBuilder<
TokenManager> primaryTokenManagerBuilder, List<IdentityProviderBuilder< identityProviderBuilders = const [], List<Object> >TokenManagerBuilder< additionalTokenManagerBuilders = const [], AuthUsers authUsers = const AuthUsers(), UserProfiles userProfiles = const UserProfiles()})TokenManager> > - Creates a new AuthServices instance.
Properties
- anonymousIdp → AnonymousIdp
-
Available on AuthServices, provided by the AnonymousIdpGetter extension
Returns the EmailIdp instance from the AuthServices.no setter - appleIdp → AppleIdp
-
Available on AuthServices, provided by the AppleIdpGetter extension
Returns the AppleIdp instance from the AuthServices.no setter - authUsers → AuthUsers
-
Manager for managing auth users.
final
- emailIdp → EmailIdp
-
Available on AuthServices, provided by the EmailIdpGetter extension
Returns the EmailIdp instance from the AuthServices.no setter - firebaseIdp → FirebaseIdp
-
Available on AuthServices, provided by the FirebaseIdpGetter extension
Returns the FirebaseIdp instance from the AuthServices.no setter - githubIdp → GitHubIdp
-
Available on AuthServices, provided by the GitHubIdpGetter extension
Returns the GitHubIdp instance from the AuthServices.no setter - googleIdp → GoogleIdp
-
Available on AuthServices, provided by the GoogleIdpGetter extension
Returns the GoogleIdp instance from the AuthServices.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- passkeyIdp → PasskeyIdp
-
Available on AuthServices, provided by the PasskeyIdpGetter extension
Returns the PasskeyIdp instance from the AuthServices.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tokenManager ↔ MultiTokenManager
-
The token manager that handles token lifecycle operations.
latefinal
- userProfiles → UserProfiles
-
Manager for managing user profiles.
final
Methods
-
authenticationHandler(
Session session, String key) → Future< AuthenticationInfo?> - Validates an authentication token and returns the associated authentication info.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → AuthServices
-
Returns the singleton instance of AuthServices used by the provider
endpoints.
no setter
Static Methods
-
getIdentityProvider<
T> () → T -
Retrieves the identity provider of type
T. -
getTokenManager<
T extends TokenManager> () → T -
Retrieves the token manager of type
T. -
set(
{required List< TokenManagerBuilder< tokenManagerBuilders, List<TokenManager> >IdentityProviderBuilder< identityProviderBuilders = const [], AuthUsersConfig authUsersConfig = const AuthUsersConfig(), UserProfileConfig userProfileConfig = const UserProfileConfig()}) → voidObject> > - Creates a new AuthServices instance and sets it as the global instance.