/ Authentication Provider interface
The implementor of this interface would contain the cloud service provider specific logic.
- Implementers
Properties
- authInterceptor → Interceptor
-
Returns the
dio.Interceptor
that is used by APIs to inject the necessary auth headers for APIs that are authorized by this identity provider.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
-
providerEventStream
→ Stream<
ProviderEvent> -
Streams events emitted by the provider
to the consumers of the provider
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
confirmSignUpCode(
String username, String code) → Future< bool> -
Confirm the registration of a particular
username
with the givencode
-
confirmVerificationCodeForAttribute(
String attribute, String code) → Future< void> -
Verifies the given
attribute
with thecode
that was sent to the user -
dispose(
) → Future< void> -
Disposes the repository provider. This method should
close and release any resources used by the backend services.
inherited
-
getLoggedInUsername(
) → Future< String?> -
Returns the
username
of the underlying provider's logged in session. If the provider session is logged in then the name will be 'null'. -
initialize(
) → Future< void> -
Initializes the repository provider. This method should
setup persistent connections to the backend services and
initialize any resources used by the backend services.
inherited
-
isLoggedIn(
String username) → Future< bool> -
Returns whether the given
username
is logged in. If ausername
is not provided then this method will return true if session is valid. This service method should also initialize the internal state with current logged in session state. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readUser(
) → Future< User> - Reads attributes of logged in user from the AWS Cognito backend. Returns a User object with the saved attributes of the currently logged in user.
-
resendSignUpCode(
String username) → Future< Verification> -
Resend sign-up code to the given
username
for verification -
resetPassword(
String username) → Future< Verification> -
Initiates a password reset flow for the given
username
-
saveUser(
User user, {List< String> ? attribNames}) → Future<void> -
Saves the
user
attributes to the AWS Cognito backend. IfattribNames
is provided then only those attributes will be saved. -
sendVerificationCodeForAttribute(
String attribute) → Future< Verification> -
Sends a verifaction code to validate the given
attribute
. -
setupTOTP(
{String? appName}) → Future< (String, Uri?)> - Setup Time-based One Time Password MFA for the logged in user
-
signIn(
String username, String password) → Future< AuthType> -
Signs in the given
username
with the givenpassword
and returns the AuthType of the sign-in process. -
signOut(
) → Future< void> - Signs out the logged in user
-
signUp(
User user, String password) → Future< Verification> -
Signs up the given
user
with the givenpassword
-
toString(
) → String -
A string representation of this object.
inherited
-
updatePassword(
String username, String password, String code) → Future< void> -
Updates the given
username
'spassword
validating the change with the givencode
-
validateMFACode(
String code) → Future< AuthType> -
Validates the given multi-factor authentication with
the given
code
and returns the AuthType of the sign-in process. -
validateSession(
) → Future< bool> - The following methods apply to the currently logged in user
-
verifyTOTP(
String code) → Future< void> -
Verifies the TOTP setup by validating a
code
generated by the token generator app with the current setup
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited