Represent an OAuth 2.0 authorization token and authorization code.
Instances of this type are created by ManagedAuthStorage to store authorization tokens and codes on behalf of an AuthServer. There is no need to use this class directly.
- Inheritance
- Object
- ManagedObject<_ManagedToken>
- ManagedToken
Constructors
- ManagedToken()
-
Empty instance.
- ManagedToken.fromCode(AuthCode code)
-
Instance from an AuthCode.
- ManagedToken.fromToken(AuthToken t)
-
Instance from an AuthToken.
Properties
- accessToken → String
-
The access token of an authorization token.
@ManagedColumnAttributes(indexed: true, unique: true, nullable: true), read / write, inherited - backing → ManagedBacking
-
read / write, inherited
- backingMap → Map<String, dynamic>
-
The managed values of this instance.
read-only, inherited - client → ManagedClient
-
The client this token was issued for.
@ManagedRelationship(#tokens, onDelete: ManagedRelationshipDeleteRule.cascade, isRequired: true), read / write, inherited - code → String
-
The authorization code of this token.
@ManagedColumnAttributes(indexed: true, unique: true, nullable: true), read / write, inherited - entity → ManagedEntity
-
The ManagedEntity this instance is described by.
read / write, inherited - expirationDate → DateTime
-
When this token will expire.
@ManagedColumnAttributes(indexed: true), read / write, inherited - hashCode → int
-
The hash code for this object.
read-only, inherited - id → int
-
A primary key identifier.
@managedPrimaryKey, read / write, inherited - issueDate → DateTime
-
When this token was last issued or refreshed.
read / write, inherited - refreshToken → String
-
The refresh token of an authorization token.
@ManagedColumnAttributes(indexed: true, unique: true, nullable: true), read / write, inherited - resourceOwner → ManagedAuthenticatable
-
The resource owner of this token.
@ManagedRelationship.deferred(ManagedRelationshipDeleteRule.cascade, isRequired: true), read / write, inherited - runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited - scope → String
-
Scopes for this token, delimited by the space character.
@ManagedColumnAttributes(nullable: true), read / write, inherited - type → String
-
The value 'bearer'.
@ManagedColumnAttributes(indexed: true, nullable: true), read / write, inherited
Operators
-
operator ==(
other) → bool -
The equality operator.
inherited -
operator [](
String propertyName) → dynamic -
Retrieves a value by property name from the backingMap.
inherited -
operator []=(
String propertyName, value) → void -
Sets a value by property name in the backingMap.
inherited
Methods
-
asAuthCode(
) → AuthCode -
As an AuthCode.
-
asToken(
) → AuthToken -
As an AuthToken.
-
asMap(
) → Map<String, dynamic> -
Converts this instance into a serializable map.
inherited -
hasValueForProperty(
String propertyName) → bool -
Checks whether or not a property has been set in this instances' backingMap.
inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited -
readFromMap(
Map<String, dynamic> keyValues) → void -
Populates the properties of a this instance from a map.
inherited -
readMap(
Map<String, dynamic> keyValues) → void -
@Deprecated("3.0, use readFromMap instead"), inherited
-
removePropertyFromBackingMap(
String propertyName) → void -
Removes a property from the backingMap.
inherited -
toString(
) → String -
Returns a string representation of this object.
inherited -
validate(
{ValidateOperation forOperation: ValidateOperation.insert, List<String> collectErrorsIn }) → bool -
Validates an object according to its property Validate metadata.
inherited -
willInsert(
) → void -
Callback to modify an object prior to inserting it with a Query.
inherited -
willUpdate(
) → void -
Callback to modify an object prior to updating it with a Query.
inherited