OauthAuthentication class
Provides an OAuth-compliant authentication
- Inheritance
-
- Object
- MailAuthentication
- UserNameBasedAuthentication
- OauthAuthentication
- Annotations
-
- @JsonSerializable()
Constructors
- OauthAuthentication.new(String userName, OauthToken token)
-
Creates a new authentication
const
- OauthAuthentication.from(String userName, String oauthTokenText, {String? provider})
-
Creates an OauthAuthentication from the given
userName
andoauthTokenText
in JSON.factory -
OauthAuthentication.fromJson(Map<
String, dynamic> json) -
Creates a new OauthAuthentication from the given
json
factory
Properties
- authentication → Authentication
-
The type of this authentication
finalinherited
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- token → OauthToken
-
Token for the access
final
- typeName → String
-
The name of this authentication type, e.g.
plain
oroauth2
no setterinherited - userName → String
-
The user name
finalinherited
Methods
-
authenticate(
ServerConfig serverConfig, {ImapClient? imap, PopClient? pop, SmtpClient? smtp}) → Future< void> -
Authenticates with the specified mail service
override
-
copyWith(
{String? userName, OauthToken? token}) → OauthAuthentication -
Copies this OauthAuthentication with the given
token
-
copyWithUserName(
String userName) → UserNameBasedAuthentication -
Copies this authentication with the new
userName
override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Converts this OauthAuthentication to JSON.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override