IssuedGrant class

A credential, and the one and only time its token is readable.

The Hub keeps a hash. If this token is lost it cannot be recovered — only revoked and reissued — which is why it is a distinct type rather than a field on Grant that is null everywhere else.

Annotations
  • @immutable

Constructors

IssuedGrant({required Grant grant, required String token})
Creates an issued grant.
const

Properties

grant Grant
The credential as the Hub recorded it.
final
hashCode int
The hash code for this object.
no setterinherited
id String
The credential's id.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
token String
The bearer token. Shown once.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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

Static Methods

fromJson(Map<String, dynamic> json) IssuedGrant
Decodes the reply, which carries the grant's fields and the token alongside them.