AuthServerRequestCreationHint class

This is sent by an RS as a response to an Unauthorized Resource Request Message to help the sender of the Unauthorized Resource Request Message acquire a valid access token.

For more information, see section 5.3 of draft-ietf-ace-oauth-authz.

Example

Figure 3 of draft-ietf-ace-oauth-authz-46 gives us an example of a Request Creation Hint payload, given in CBOR diagnostic notation

{
    "AS" : "coaps://as.example.com/token",
    "audience" : "coaps://rs.example.com"
    "scope" : "rTempC",
    "cnonce" : h'e0a156bb3f'
}

(Note that abbreviations aren't used here, so keep in mind that the labels are really integers instead of strings.)

This could be built and serialized as an AuthServerRequestCreationHint like so:

final scope = TextScope("rTempC");
final hint = AuthServerRequestCreationHint(
    authorizationServer: "coaps://as.example.com/token",
    audience: "coaps://rs.example.com",
    scope: scope,
    clientNonce: [0xe0, 0xa1, 0x56, 0xbb, 0x3f]);
final serialized = hint.serialize();
assert(AuthServerRequestCreationHint.fromSerialized(serialized) == request);

Constructors

AuthServerRequestCreationHint({String? authorizationServer, ByteString? keyID, String? audience, Scope? scope, ByteString? clientNonce})
Creates a new AuthServerRequestCreationHint instance.
AuthServerRequestCreationHint.fromSerialized(List<int> serialized)
Creates a new AuthServerRequestCreationHint instance from the given serialized CBOR.

Properties

audience String?
An identifier the client should request at the AS, as suggested by the RS.
getter/setter pair
authorizationServer String?
An absolute URI that identifies the appropriate AS for the RS.
getter/setter pair
clientNonce ↔ ByteString?
A client nonce as described in section 5.3.1 of draft-ietf-ace-oauth-authz.
getter/setter pair
hashCode int
The hash code for this object.
no setteroverride
keyID ↔ ByteString?
The key identifier of a key used in an existing security association between the client and the RS.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scope ↔ Scope?
The suggested scope that the client should request towards the AS.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
serialize() List<int>
Serializes this instance into CBOR, returning the resulting bytes.
inherited
toCborMap() Map<int, CborValue>
Serializes this instance to a Map from CBOR labels to CborValues.
toCborValue() → CborValue
Serializes this instance to a CborValue.
inherited
toString() String
A string representation of this object.
override

Operators

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