MethodChannelAutologin class
An implementation of AutologinPlatform that uses method channels.
- Inheritance
-
- Object
- PlatformInterface
- AutologinPlatform
- MethodChannelAutologin
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
isPlatformSupported
→ Future<
bool> -
Returns
true
when the current platform is supported.no setterinherited - methodChannel → MethodChannel
-
The method channel used to interact with the native platform.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
deleteLoginToken(
) → Future< bool> -
Delete the saved login token, returns
true
when successful.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
performCompatibilityChecks(
) → Future< Compatibilities> -
Return the Compatibilities which depends on the platform or the browser
in case of web.
override
-
requestCredentials(
) → Future< Credential?> -
Returns the saved Credential when set by saveCredentials or is
null
when not found.override -
requestLoginToken(
) → Future< String?> -
Returns the saved token which was set by saveLoginToken or is
null
when not found. This can be a refresh token or anything else which you can use to identify the user. You should validate that this token is still valid before authenticating the user. Depending on your use case asking for a second factor would be a good idea.override -
saveCredentials(
Credential credential) → Future< bool> -
Returns
true
when the Credentials could be saved, otherwisefalse
.override -
saveLoginToken(
String token) → Future< bool> -
Returns
true
when thetoken
could be saved, otherwisefalse
. This token is intended to be synchronized by the platform you are using. This can be a refresh token or anything else which you can use to identify the user. For security reasons you should not store credentials.override -
setup(
{String? domain, String? appId, String? appName}) → void -
Depending on your target platforms you need to setup attentional data. For
iOS and MacOS the
domain
is required to ask the operating system for credentials for that domain. For Linux is anappId
anappName
required to select the credentials of your app (the name is in fact just for the label in the password manager). If you don't target those platforms you can omit this call.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited