Class SamlAuthenticationHandler
The SAML authentication handler.
Inheritance
System.Object
Microsoft.AspNetCore.Authentication.AuthenticationHandler<SamlAuthenticationOptions>
SamlAuthenticationHandler
Implements
Microsoft.AspNetCore.Authentication.IAuthenticationRequestHandler
Microsoft.AspNetCore.Authentication.IAuthenticationSignOutHandler
Microsoft.AspNetCore.Authentication.IAuthenticationHandler
Inherited Members
Microsoft.AspNetCore.Authentication.AuthenticationHandler<ComponentSpace.Saml2.Authentication.SamlAuthenticationOptions>.InitializeAsync(Microsoft.AspNetCore.Authentication.AuthenticationScheme, Microsoft.AspNetCore.Http.HttpContext)
Microsoft.AspNetCore.Authentication.AuthenticationHandler<ComponentSpace.Saml2.Authentication.SamlAuthenticationOptions>.InitializeEventsAsync()
Microsoft.AspNetCore.Authentication.AuthenticationHandler<ComponentSpace.Saml2.Authentication.SamlAuthenticationOptions>.CreateEventsAsync()
Microsoft.AspNetCore.Authentication.AuthenticationHandler<ComponentSpace.Saml2.Authentication.SamlAuthenticationOptions>.InitializeHandlerAsync()
Microsoft.AspNetCore.Authentication.AuthenticationHandler<ComponentSpace.Saml2.Authentication.SamlAuthenticationOptions>.BuildRedirectUri(System.String)
Microsoft.AspNetCore.Authentication.AuthenticationHandler<ComponentSpace.Saml2.Authentication.SamlAuthenticationOptions>.ResolveTarget(System.String)
Microsoft.AspNetCore.Authentication.AuthenticationHandler<ComponentSpace.Saml2.Authentication.SamlAuthenticationOptions>.AuthenticateAsync()
Microsoft.AspNetCore.Authentication.AuthenticationHandler<ComponentSpace.Saml2.Authentication.SamlAuthenticationOptions>.HandleAuthenticateOnceAsync()
Microsoft.AspNetCore.Authentication.AuthenticationHandler<ComponentSpace.Saml2.Authentication.SamlAuthenticationOptions>.HandleAuthenticateOnceSafeAsync()
Microsoft.AspNetCore.Authentication.AuthenticationHandler<ComponentSpace.Saml2.Authentication.SamlAuthenticationOptions>.ChallengeAsync(Microsoft.AspNetCore.Authentication.AuthenticationProperties)
Microsoft.AspNetCore.Authentication.AuthenticationHandler<ComponentSpace.Saml2.Authentication.SamlAuthenticationOptions>.ForbidAsync(Microsoft.AspNetCore.Authentication.AuthenticationProperties)
Microsoft.AspNetCore.Authentication.AuthenticationHandler<ComponentSpace.Saml2.Authentication.SamlAuthenticationOptions>.Scheme
Microsoft.AspNetCore.Authentication.AuthenticationHandler<ComponentSpace.Saml2.Authentication.SamlAuthenticationOptions>.Options
Microsoft.AspNetCore.Authentication.AuthenticationHandler<ComponentSpace.Saml2.Authentication.SamlAuthenticationOptions>.Context
Microsoft.AspNetCore.Authentication.AuthenticationHandler<ComponentSpace.Saml2.Authentication.SamlAuthenticationOptions>.Request
Microsoft.AspNetCore.Authentication.AuthenticationHandler<ComponentSpace.Saml2.Authentication.SamlAuthenticationOptions>.Response
Microsoft.AspNetCore.Authentication.AuthenticationHandler<ComponentSpace.Saml2.Authentication.SamlAuthenticationOptions>.OriginalPath
Microsoft.AspNetCore.Authentication.AuthenticationHandler<ComponentSpace.Saml2.Authentication.SamlAuthenticationOptions>.OriginalPathBase
Microsoft.AspNetCore.Authentication.AuthenticationHandler<ComponentSpace.Saml2.Authentication.SamlAuthenticationOptions>.Logger
Microsoft.AspNetCore.Authentication.AuthenticationHandler<ComponentSpace.Saml2.Authentication.SamlAuthenticationOptions>.UrlEncoder
Microsoft.AspNetCore.Authentication.AuthenticationHandler<ComponentSpace.Saml2.Authentication.SamlAuthenticationOptions>.Clock
Microsoft.AspNetCore.Authentication.AuthenticationHandler<ComponentSpace.Saml2.Authentication.SamlAuthenticationOptions>.OptionsMonitor
Microsoft.AspNetCore.Authentication.AuthenticationHandler<ComponentSpace.Saml2.Authentication.SamlAuthenticationOptions>.Events
Microsoft.AspNetCore.Authentication.AuthenticationHandler<ComponentSpace.Saml2.Authentication.SamlAuthenticationOptions>.ClaimsIssuer
Microsoft.AspNetCore.Authentication.AuthenticationHandler<ComponentSpace.Saml2.Authentication.SamlAuthenticationOptions>.CurrentUri
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ComponentSpace.Saml2.Authentication
Assembly: ComponentSpace.Saml2.dll
Syntax
public class SamlAuthenticationHandler : AuthenticationHandler<SamlAuthenticationOptions>, IAuthenticationRequestHandler, IAuthenticationSignOutHandler, IAuthenticationHandler
Constructors
SamlAuthenticationHandler(IOptionsMonitor<SamlAuthenticationOptions>, ILoggerFactory, UrlEncoder, ISystemClock, ISamlServiceProvider, ISsoSessionStore, ISamlClaimFactory, IUrlUtility)
Initializes a new instance of the SamlAuthenticationHandler
class.
Declaration
public SamlAuthenticationHandler(IOptionsMonitor<SamlAuthenticationOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock, ISamlServiceProvider samlServiceProvider, ISsoSessionStore ssoSessionStore, ISamlClaimFactory samlClaimFactory, IUrlUtility urlUtility)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Extensions.Options.IOptionsMonitor<SamlAuthenticationOptions> | options | The SAML authentication options. |
Microsoft.Extensions.Logging.ILoggerFactory | logger | The logger factory. |
System.Text.Encodings.Web.UrlEncoder | encoder | The URL encoder. |
Microsoft.AspNetCore.Authentication.ISystemClock | clock | The system clock. |
ISamlServiceProvider | samlServiceProvider | The SAML service provider. |
ISsoSessionStore | ssoSessionStore | The SSO session store. |
ISamlClaimFactory | samlClaimFactory | The SAML claims factory. |
IUrlUtility | urlUtility | The URL utility. |
Methods
HandleAuthenticateAsync()
Handles authentication.
Declaration
protected override Task<AuthenticateResult> HandleAuthenticateAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Microsoft.AspNetCore.Authentication.AuthenticateResult> | A task that represents the operation. |
Overrides
Microsoft.AspNetCore.Authentication.AuthenticationHandler<ComponentSpace.Saml2.Authentication.SamlAuthenticationOptions>.HandleAuthenticateAsync()
HandleChallengeAsync(AuthenticationProperties)
Handles challenge.
Declaration
protected override async Task HandleChallengeAsync(AuthenticationProperties authenticationProperties)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Authentication.AuthenticationProperties | authenticationProperties | The authentication properties. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task that represents the operation. |
Overrides
Microsoft.AspNetCore.Authentication.AuthenticationHandler<ComponentSpace.Saml2.Authentication.SamlAuthenticationOptions>.HandleChallengeAsync(Microsoft.AspNetCore.Authentication.AuthenticationProperties)
HandleForbiddenAsync(AuthenticationProperties)
Handles forbidden.
Declaration
protected override Task HandleForbiddenAsync(AuthenticationProperties authenticationProperties)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Authentication.AuthenticationProperties | authenticationProperties | The authentication properties. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task that represents the operation. |
Overrides
Microsoft.AspNetCore.Authentication.AuthenticationHandler<ComponentSpace.Saml2.Authentication.SamlAuthenticationOptions>.HandleForbiddenAsync(Microsoft.AspNetCore.Authentication.AuthenticationProperties)
HandleRequestAsync()
Handles a request.
Declaration
public virtual async Task<bool> HandleRequestAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> |
|
SignOutAsync(AuthenticationProperties)
Signs out.
Declaration
public virtual async Task SignOutAsync(AuthenticationProperties authenticationProperties)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Authentication.AuthenticationProperties | authenticationProperties | The authentication properties. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task that represents the operation. |
Implements
Microsoft.AspNetCore.Authentication.IAuthenticationRequestHandler
Microsoft.AspNetCore.Authentication.IAuthenticationSignOutHandler
Microsoft.AspNetCore.Authentication.IAuthenticationHandler