Table of Contents

Class SamlSignInDenialService

Namespace
Fdyay.IdentityServer.Saml.Hosting
Assembly
Fdyay.IdentityServer.Saml.dll

Records a denied SAML sign-in on its stored state, for the sign-on endpoint that resumes it to answer.

public sealed class SamlSignInDenialService : ISamlSignInDenialService
Inheritance
SamlSignInDenialService
Implements
Inherited Members

Remarks

Duende 8.0.1's DenyAuthenticationAsync for a SamlAuthenticationContext, measured: the state the context names is read, given the error and its description, and stored back; a state no longer there is logged at Warning and left.

Constructors

SamlSignInDenialService(ISamlSigninStateStore, ILogger<SamlSignInDenialService>?)

Creates the service over the store the sign-on endpoint resumes from.

public SamlSignInDenialService(ISamlSigninStateStore signInStates, ILogger<SamlSignInDenialService>? logger = null)

Parameters

signInStates ISamlSigninStateStore

Holds the stored sign-ins a denial is recorded on.

logger ILogger<SamlSignInDenialService>

Where a missing state and a recorded denial are logged; nothing is logged when null.

Exceptions

ArgumentNullException

signInStates is null.

Methods

TryDenyAsync(IAuthenticationContext, InteractionError, string?, CancellationToken)

Records the denial when context is a SAML sign-in; false when it is not one.

public Task<bool> TryDenyAsync(IAuthenticationContext context, InteractionError interactionError, string? errorDescription, CancellationToken cancellationToken = default)

Parameters

context IAuthenticationContext
interactionError InteractionError
errorDescription string
cancellationToken CancellationToken

Returns

Task<bool>

Remarks

True as well when the sign-in it names is no longer waiting — expired, or already answered — as Duende's: there is nothing left to record the denial on, and it is logged rather than thrown.

Exceptions

ArgumentNullException

context is null.