AWSCognitoService class final

Implemented types

Constructors

AWSCognitoService({AuthCategory? auth})

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 setteroverride
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 setteroverride
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 given code
override
confirmVerificationCodeForAttribute(String attribute, String code) Future<void>
Verifies the given attribute with the code that was sent to the user
override
dispose() Future<void>
Disposes the repository provider. This method should close and release any resources used by the backend services.
override
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'.
override
intiatialize() 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.
override
isLoggedIn(String username) Future<bool>
Returns whether the given username is logged in. If a username 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.
override
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.
override
resendSignUpCode(String username) Future<Verification>
Resend sign-up code to the given username for verification
override
resetPassword(String username) Future<Verification>
Initiates a password reset flow for the given username
override
saveUser(User user, {List<String>? attribNames}) Future<void>
Saves the user attributes to the AWS Cognito backend. If attribNames is provided then only those attributes will be saved.
override
sendVerificationCodeForAttribute(String attribute) Future<Verification>
Sends a verifaction code to validate the given attribute.
override
setupTOTP({String? appName}) Future<(String, Uri?)>
Setup Time-based One Time Password MFA for the logged in user
override
signIn(String username, String password) Future<AuthType>
Signs in the given username with the given password and returns the AuthType of the sign-in process.
override
signOut() Future<void>
Signs out the logged in user
override
signUp(User user, String password) Future<Verification>
Signs up the given user with the given password
override
toString() String
A string representation of this object.
inherited
updatePassword(String username, String password, String code) Future<void>
Updates the given username's password validating the change with the given code
override
validateMFACode(String code) Future<AuthType>
Validates the given multi-factor authentication with the given code and returns the AuthType of the sign-in process.
override
validateSession() Future<bool>
The following methods apply to the currently logged in user
override
verifyTOTP(String code) Future<void>
Verifies the TOTP setup by validating a code generated by the token generator app with the current setup
override

Operators

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