TokenRequestSpec class
TokenRequestSpec contains client provided parameters of a token request.
Constructors
-
TokenRequestSpec({required List<
String> audiences, BoundObjectReference? boundObjectRef, int? expirationSeconds}) -
Default constructor.
const
-
TokenRequestSpec.fromJson(Map<
String, dynamic> json) -
Creates a TokenRequestSpec from JSON data.
factory
Properties
-
audiences
→ List<
String> -
Audiences are the intendend audiences of the token. A recipient of a token must identify themself with an identifier in the list of audiences of the token, and otherwise should reject the token. A token issued for multiple audiences may be used to authenticate against any of the audiences listed but implies a high degree of trust between the target audiences.
final
- boundObjectRef → BoundObjectReference?
-
BoundObjectRef is a reference to an object that the token will be bound to. The token will only be valid for as long as the bound object exists. NOTE: The API server's TokenReview endpoint will validate the BoundObjectRef, but other audiences may not. Keep ExpirationSeconds small if you want prompt revocation.
final
- expirationSeconds → int?
-
ExpirationSeconds is the requested duration of validity of the request. The token issuer may return a token with a different validity duration so a client needs to check the 'expiration' field in a response.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object> - Converts a TokenRequestSpec instance to JSON data.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited