AWSCognitoService class final
- Inheritance
-
- Object
- AuthSession
- AWSCognitoService
- Implemented types
Constructors
- AWSCognitoService({AuthCategory? auth})
-
Factory constructor for AWSCognitoService
factory
Properties
- accessToken → String?
-
The current logged in user's access token
no setteroverride
- authInterceptor → Interceptor
-
Returns the
dio.Interceptorthat 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
- jwtToken → JWT?
-
The current logged in user's JWT token
no setterinherited
- loggedIn → bool
-
Returns if the user is currently logged in
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
- userId → String?
-
The current logged in user's user id
no setteroverride
Methods
-
confirmSignUpCode(
String username, String code) → Future< bool> -
Confirm the registration of a particular
usernamewith the givencodeoverride -
confirmVerificationCodeForAttribute(
String attribute, String code) → Future< void> -
Verifies the given
attributewith thecodethat was sent to the useroverride -
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
usernameof the underlying provider's logged in session. If the provider session is logged in then the name will be 'null'.override -
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.
override
-
isLoggedIn(
String username) → Future< bool> -
Returns whether the given
usernameis logged in. If ausernameis 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
usernamefor verificationoverride -
resetPassword(
String username) → Future< Verification> -
Initiates a password reset flow for the given
usernameoverride -
saveUser(
User user, {List< String> ? attribNames}) → Future<void> -
Saves the
userattributes to the AWS Cognito backend. IfattribNamesis 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
usernamewith the givenpasswordand 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
userwith the givenpasswordoverride -
toString(
) → String -
A string representation of this object.
inherited
-
updatePassword(
String username, String password, String code) → Future< void> -
Updates the given
username'spasswordvalidating the change with the givencodeoverride -
validateMFACode(
String code) → Future< AuthType> -
Validates the given multi-factor authentication with
the given
codeand 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
codegenerated by the token generator app with the current setupoverride
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited