Class MicrosoftIDentityPlatformAuthHandler
- Namespace
- Cratis.Arc.Identity
- Assembly
- Cratis.Arc.dll
Represents an AuthenticationHandler<TOptions> for handling authentication in the context of Microsoft Identity Platform.
public class MicrosoftIDentityPlatformAuthHandler : AuthenticationHandler<AuthenticationSchemeOptions>, IAuthenticationHandler
- Inheritance
-
MicrosoftIDentityPlatformAuthHandler
- Implements
- Inherited Members
- Extension Methods
Remarks
The forwarded identity headers are not signed. The handler ignores them and returns no result, so the request stays anonymous, unless TrustForwardedIdentityHeaders is enabled because the host runs behind a trusted ingress.
Constructors
MicrosoftIDentityPlatformAuthHandler(IOptionsMonitor<AuthenticationSchemeOptions>, ILoggerFactory, UrlEncoder)
Initializes a new instance of the MicrosoftIDentityPlatformAuthHandler class, resolving the host's trust setting from request services when authentication runs.
[Obsolete("Use the constructor accepting IOptionsMonitor<ArcOptions>. Forwarded identity headers are untrusted unless the host opts in.")]
public MicrosoftIDentityPlatformAuthHandler(IOptionsMonitor<AuthenticationSchemeOptions> options, ILoggerFactory loggerFactory, UrlEncoder encoder)
Parameters
optionsIOptionsMonitor<AuthenticationSchemeOptions>loggerFactoryILoggerFactoryThe ILoggerFactory.
encoderUrlEncoderThe UrlEncoder.
MicrosoftIDentityPlatformAuthHandler(IOptionsMonitor<AuthenticationSchemeOptions>, IOptionsMonitor<ArcOptions>, ILoggerFactory, UrlEncoder)
Initializes a new instance of the MicrosoftIDentityPlatformAuthHandler class.
[ActivatorUtilitiesConstructor]
public MicrosoftIDentityPlatformAuthHandler(IOptionsMonitor<AuthenticationSchemeOptions> options, IOptionsMonitor<ArcOptions> arcOptions, ILoggerFactory loggerFactory, UrlEncoder encoder)
Parameters
optionsIOptionsMonitor<AuthenticationSchemeOptions>arcOptionsIOptionsMonitor<ArcOptions>The ArcOptions that decide whether forwarded identity headers are trusted.
loggerFactoryILoggerFactoryThe ILoggerFactory.
encoderUrlEncoderThe UrlEncoder.
Fields
SchemeName
Gets the scheme name.
public const string SchemeName = "MicrosoftIdentityPlatform"
Field Value
Methods
HandleAuthenticateAsync()
protected override Task<AuthenticateResult> HandleAuthenticateAsync()