AbstractAuthRepository class abstract

Authentication repository interface.

All methods may throw ConnectionException and GraphQlException.

Implementers

Constructors

AbstractAuthRepository()

Properties

authExceptionHandler Future<void> Function(AuthorizationException)?
Sets handler that will be called on any AuthorizationException.
no getter
hashCode int
The hash code for this object.
no setterinherited
profiles RxList<MyUser>
Returns the known MyUser profiles.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
token AccessTokenSecret?
Sets an authorization token of this repository.
no getter

Methods

applyToken() → void
Applies the specified token right away instead of the lazy reconnection.
createConfirmationCode({UserLogin? login, UserNum? num, UserEmail? email, UserPhone? phone, String? locale}) Future<void>
Generates and sends a new single-use ConfirmationCode for the MyUser identified by the provided login, num, email and/or phone.
deleteSession({SessionId? id, UserPassword? password, DeviceToken? token, AccessTokenSecret? accessToken}) Future<void>
Invalidates a Session with the provided id of the MyUser identified by the accessToken, if any, or otherwise Session of the MyUser identified by the token.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
refreshSession(RefreshTokenSecret secret, {bool reconnect}) Future<Credentials>
Refreshes the current AccessToken.
removeAccount(UserId id, {bool keepProfile = false}) Future<void>
Deletes the MyUser identified by the provided id from the accounts.
signIn({UserLogin? login, UserNum? num, UserEmail? email, UserPhone? phone, UserPassword? password, ConfirmationCode? code}) Future<Credentials>
Creates a new Session for the MyUser identified by the provided num/login/email/phone (exactly one of four should be specified).
signUp({UserPassword? password, UserLogin? login}) Future<Credentials>
Creates a new MyUser having only UserId and UserNum fields, and creates a new Session for this MyUser.
toString() String
A string representation of this object.
inherited
updateUserPassword({required ConfirmationCode code, required UserPassword newPassword, UserLogin? login, UserNum? num, UserEmail? email, UserPhone? phone}) Future<void>
Resets password for a MyUser identified by the provided num/login/email/phone (exactly one of fourth should be specified) and recovery ConfirmationCode.
Uses the specified ChatDirectLink by the authenticated MyUser creating a new Chat-dialog or joining an existing Chat-group.
validateConfirmationCode({UserLogin? login, UserNum? num, UserEmail? email, UserPhone? phone, required ConfirmationCode code}) Future<void>
Validates the provided ConfirmationCode for the MyUser identified by the provided login, num, email and/or phone without using it.
validateToken(Credentials credentials) Future<void>
Validates the AccessToken of the provided Credentials.

Operators

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