Table of Contents

Class SenderConstraintResult

Namespace
Fdyay.IdentityServer.Validation
Assembly
Fdyay.IdentityServer.AspNetCore.dll

Whether the presenter of a token holds what the token is bound to.

public sealed class SenderConstraintResult
Inheritance
SenderConstraintResult
Inherited Members

Properties

Challenge

The scheme a refusal challenges with, so the client learns how the token should have come.

public string Challenge { get; }

Property Value

string

Remarks

DPoP for a token bound to a key, per RFC 9449 §7.1 — a client answered with a Bearer challenge for a DPoP-bound token is told to retry the way that cannot work.

Named from TokenTypes: the token_type a token is issued as and the scheme it is presented under are the same two strings by RFC 9449 §7.1's own construction, and a second definition of them here would be two spellings to keep in agreement rather than one.

Error

The error the challenge carries: invalid_token for the token, invalid_dpop_proof for a proof that failed, or use_dpop_nonce.

public string Error { get; }

Property Value

string

ErrorDescription

The challenge's error_description: Duende's wording for a refusal made here, the proof validator's for one it made.

public string? ErrorDescription { get; }

Property Value

string

IsError

Whether the presenter failed to show it holds what the token is bound to.

public bool IsError { get; }

Property Value

bool

Nonce

A nonce for the client's next proof, sent back in the DPoP-Nonce header (RFC 9449 §9).

public string? Nonce { get; }

Property Value

string

Methods

NonceRequired(string)

Refused until the client signs nonce into a new proof.

public static SenderConstraintResult NonceRequired(string nonce)

Parameters

nonce string

Returns

SenderConstraintResult

NonceRequired(string, string?)

Refused until the client signs nonce into a new proof, saying why.

public static SenderConstraintResult NonceRequired(string nonce, string? description)

Parameters

nonce string
description string

Returns

SenderConstraintResult

Refused(string)

Refused with invalid_token, challenging with challenge.

public static SenderConstraintResult Refused(string challenge)

Parameters

challenge string

The scheme the refusal challenges with: Bearer, or DPoP for a key-bound token.

Returns

SenderConstraintResult

An error result.

Refused(string, string)

Refused with error rather than invalid_token.

public static SenderConstraintResult Refused(string challenge, string error)

Parameters

challenge string
error string

Returns

SenderConstraintResult

Refused(string, string, string?)

Refused with error, saying why in description.

public static SenderConstraintResult Refused(string challenge, string error, string? description)

Parameters

challenge string
error string
description string

Returns

SenderConstraintResult

Satisfied()

The presenter holds what the token is bound to, or the token is bound to nothing.

public static SenderConstraintResult Satisfied()

Returns

SenderConstraintResult

A result that is not an error.