Table of Contents

Struct PushedAuthorizationReference

Namespace
Fdyay.IdentityServer.Hosting
Assembly
Fdyay.IdentityServer.AspNetCore.dll

The single-use reference a client is given in place of a pushed authorization request.

public readonly struct PushedAuthorizationReference : IEquatable<PushedAuthorizationReference>
Implements
Inherited Members

Remarks

The reference value is a bearer credential: whoever holds it resumes the request it stands for. It is therefore generated from a cryptographic RNG and only its hash is persisted, so a reader of the store learns nothing it can present. The URN prefix is fixed by RFC 9126 ยง2.2.

Fields

UrnPrefix

The URN prefix RFC 9126 requires a pushed request's request_uri to carry.

public const string UrnPrefix = "urn:ietf:params:oauth:request_uri:"

Field Value

string

Properties

Hash

The hash of the reference value, which is what the store holds.

public string Hash { get; }

Property Value

string

RequestUri

The request_uri handed to the client.

public string RequestUri { get; }

Property Value

string

Methods

Create()

Mints a new reference from 256 bits of cryptographic randomness.

public static PushedAuthorizationReference Create()

Returns

PushedAuthorizationReference

Equals(PushedAuthorizationReference)

Whether other is the same reference, compared by hash.

public bool Equals(PushedAuthorizationReference other)

Parameters

other PushedAuthorizationReference

The reference to compare with.

Returns

bool

True when the hashes are equal (ordinal).

Equals(object?)

Whether obj is a PushedAuthorizationReference with the same hash.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with.

Returns

bool

True when it is the same reference.

GetHashCode()

The hash code of Hash, or 0 for a default value.

public override int GetHashCode()

Returns

int

The hash code.

HashOf(string?)

Hashes the value carried by a presented request_uri, or null when it is not one of ours.

public static string? HashOf(string? requestUri)

Parameters

requestUri string

Returns

string

Operators

operator ==(PushedAuthorizationReference, PushedAuthorizationReference)

Whether two references are the same, compared by hash.

public static bool operator ==(PushedAuthorizationReference left, PushedAuthorizationReference right)

Parameters

left PushedAuthorizationReference

The first reference.

right PushedAuthorizationReference

The second reference.

Returns

bool

True when they are equal.

operator !=(PushedAuthorizationReference, PushedAuthorizationReference)

Whether two references differ, compared by hash.

public static bool operator !=(PushedAuthorizationReference left, PushedAuthorizationReference right)

Parameters

left PushedAuthorizationReference

The first reference.

right PushedAuthorizationReference

The second reference.

Returns

bool

True when they are not equal.