RefreshToken class

Represents a Refresh Token from OAuth2.0/OpenID Connect.

Used to get a new AccessToken from the S3I-IdentityProvider without authentication of the user with username/password. There are two types of RefreshToken in the S3I: normal Refresh Token and Offline Tokens. An Offline Token is a special Refresh Token with special rights and a longer life time than normal a Refresh Token. To receive an Offline Token instead of a Refresh Token add offline_access to the scopes of the AuthenticationManager-Instance and ensure that your client has this scope assigned.

Inheritance

Constructors

RefreshToken(String originalToken)
Creates a new RefreshToken from the given string.

Properties

decodedPayload Map<String, dynamic>
The payload information stored in originalToken for easy access.
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
originalToken String
The complete original token with header, payload and signature.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getExpirationDate() DateTime
Returns the exact moment when the token expires or the start of the epoch if the expiration date could not be found.
override
isNotExpired({int timeBufferInSeconds = 0}) bool
Returns true if the token is still valid.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
timeTillExpiration() Duration
Returns the duration from now until the token expires.
inherited
toString() String
A string representation of this object.
override

Operators

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