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
signInStatesISamlSigninStateStoreHolds the stored sign-ins a denial is recorded on.
loggerILogger<SamlSignInDenialService>Where a missing state and a recorded denial are logged; nothing is logged when null.
Exceptions
- ArgumentNullException
signInStatesis 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
contextIAuthenticationContextinteractionErrorInteractionErrorerrorDescriptionstringcancellationTokenCancellationToken
Returns
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
contextis null.