Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
OpenIdConnectHandler Class
Definition
- Assembly:
- Microsoft.AspNetCore.Authentication.OpenIdConnect.dll
- Package:
- Microsoft.AspNetCore.Authentication.OpenIdConnect v1.0.0
- Package:
- Microsoft.AspNetCore.Authentication.OpenIdConnect v1.1.0
- Package:
- Microsoft.AspNetCore.Authentication.OpenIdConnect v10.0.0
- Package:
- Microsoft.AspNetCore.Authentication.OpenIdConnect v11.0.0-preview.5.26302.115
- Package:
- Microsoft.AspNetCore.Authentication.OpenIdConnect v2.0.0
- Package:
- Microsoft.AspNetCore.Authentication.OpenIdConnect v2.1.0
- Package:
- Microsoft.AspNetCore.Authentication.OpenIdConnect v2.2.0
- Package:
- Microsoft.AspNetCore.Authentication.OpenIdConnect v3.0.3
- Package:
- Microsoft.AspNetCore.Authentication.OpenIdConnect v3.1.18
- Package:
- Microsoft.AspNetCore.Authentication.OpenIdConnect v5.0.9
- Package:
- Microsoft.AspNetCore.Authentication.OpenIdConnect v6.0.6
- Package:
- Microsoft.AspNetCore.Authentication.OpenIdConnect v7.0.5
- Package:
- Microsoft.AspNetCore.Authentication.OpenIdConnect v8.0.19
- Package:
- Microsoft.AspNetCore.Authentication.OpenIdConnect v9.0.8
- Source:
- OpenIdConnectHandler.cs
- Source:
- OpenIdConnectHandler.cs
- Source:
- OpenIdConnectHandler.cs
- Source:
- OpenIdConnectHandler.cs
- Source:
- OpenIdConnectHandler.cs
- Source:
- OpenIdConnectHandler.cs
- Source:
- OpenIdConnectHandler.cs
- Source:
- OpenIdConnectHandler.cs
- Source:
- OpenIdConnectHandler.cs
- Source:
- OpenIdConnectHandler.cs
- Source:
- OpenIdConnectHandler.cs
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A per-request authentication handler for the OpenIdConnectAuthenticationMiddleware.
public ref class OpenIdConnectHandler : Microsoft::AspNetCore::Authentication::RemoteAuthenticationHandler<Microsoft::AspNetCore::Builder::OpenIdConnectOptions ^>
public ref class OpenIdConnectHandler : Microsoft::AspNetCore::Authentication::RemoteAuthenticationHandler<Microsoft::AspNetCore::Authentication::OpenIdConnect::OpenIdConnectOptions ^>, Microsoft::AspNetCore::Authentication::IAuthenticationSignOutHandler
public class OpenIdConnectHandler : Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler<Microsoft.AspNetCore.Builder.OpenIdConnectOptions>
public class OpenIdConnectHandler : Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler<Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectOptions>, Microsoft.AspNetCore.Authentication.IAuthenticationSignOutHandler
type OpenIdConnectHandler = class
inherit RemoteAuthenticationHandler<OpenIdConnectOptions>
type OpenIdConnectHandler = class
inherit RemoteAuthenticationHandler<OpenIdConnectOptions>
interface IAuthenticationSignOutHandler
interface IAuthenticationHandler
Public Class OpenIdConnectHandler
Inherits RemoteAuthenticationHandler(Of OpenIdConnectOptions)
Public Class OpenIdConnectHandler
Inherits RemoteAuthenticationHandler(Of OpenIdConnectOptions)
Implements IAuthenticationSignOutHandler
- Inheritance
-
OpenIdConnectHandler
- Inheritance
-
OpenIdConnectHandler
- Implements
Constructors
| Name | Description |
|---|---|
| OpenIdConnectHandler(HttpClient, HtmlEncoder) | |
| OpenIdConnectHandler(IOptionsMonitor<OpenIdConnectOptions>, ILoggerFactory, HtmlEncoder, UrlEncoder, ISystemClock) |
Obsolete.
Initializes a new instance of OpenIdConnectHandler. |
| OpenIdConnectHandler(IOptionsMonitor<OpenIdConnectOptions>, ILoggerFactory, HtmlEncoder, UrlEncoder) |
Initializes a new instance of OpenIdConnectHandler. |
Properties
| Name | Description |
|---|---|
| Backchannel |
Gets the HttpClient used to communicate with the remote identity provider. |
| ClaimsIssuer |
Gets the issuer that should be used when any claims are issued. (Inherited from AuthenticationHandler<TOptions>) |
| Clock |
Obsolete.
Gets the ISystemClock. (Inherited from AuthenticationHandler<TOptions>) |
| Context |
Gets or sets the HttpContext. (Inherited from AuthenticationHandler<TOptions>) |
| CurrentUri |
Gets the absolute current url. (Inherited from AuthenticationHandler<TOptions>) |
| Events |
The handler calls methods on the events which give the application control at certain points where processing is occurring. If it is not provided a default instance is supplied which does nothing when the methods are called. |
| HtmlEncoder |
Gets the HtmlEncoder. |
| Logger |
Gets the ILogger. (Inherited from AuthenticationHandler<TOptions>) |
| Options |
Gets or sets the options associated with this authentication handler. (Inherited from AuthenticationHandler<TOptions>) |
| OptionsMonitor |
Gets the IOptionsMonitor<TOptions> to detect changes to options. (Inherited from AuthenticationHandler<TOptions>) |
| OriginalPath |
Gets the path as seen by the authentication middleware. (Inherited from AuthenticationHandler<TOptions>) |
| OriginalPathBase |
Gets the path base as seen by the authentication middleware. (Inherited from AuthenticationHandler<TOptions>) |
| Request |
Gets the HttpRequest associated with the current request. (Inherited from AuthenticationHandler<TOptions>) |
| Response |
Gets the HttpResponse associated with the current request. (Inherited from AuthenticationHandler<TOptions>) |
| Scheme |
Gets or sets the AuthenticationScheme associated with this authentication handler. (Inherited from AuthenticationHandler<TOptions>) |
| SignInScheme |
The authentication scheme used by default for signin. (Inherited from RemoteAuthenticationHandler<TOptions>) |
| TimeProvider |
Gets the current time, primarily for unit testing. (Inherited from AuthenticationHandler<TOptions>) |
| UrlEncoder |
Gets the UrlEncoder. (Inherited from AuthenticationHandler<TOptions>) |
Methods
| Name | Description |
|---|---|
| AuthenticateAsync() |
Authenticate the current request. (Inherited from AuthenticationHandler<TOptions>) |
| BuildRedirectUri(String) |
Constructs an absolute url for the specified |
| ChallengeAsync(AuthenticationProperties) |
Challenge the current request. (Inherited from AuthenticationHandler<TOptions>) |
| CreateEventsAsync() |
Creates a new instance of the events instance. |
| ForbidAsync(AuthenticationProperties) |
Forbid the current request. (Inherited from AuthenticationHandler<TOptions>) |
| GenerateCorrelationId(AuthenticationProperties) |
Produces a cookie containing a nonce used to correlate the current remote authentication request. (Inherited from RemoteAuthenticationHandler<TOptions>) |
| GetUserInformationAsync(OpenIdConnectMessage, JwtSecurityToken, AuthenticationTicket) |
Goes to UserInfo endpoint to retrieve additional claims and add any unique claims to the given identity. |
| GetUserInformationAsync(OpenIdConnectMessage, JwtSecurityToken, ClaimsPrincipal, AuthenticationProperties) |
Goes to UserInfo endpoint to retrieve additional claims and add any unique claims to the given identity. |
| HandleAccessDeniedErrorAsync(AuthenticationProperties) |
Derived types may override this method to handle access denied errors. (Inherited from RemoteAuthenticationHandler<TOptions>) |
| HandleAuthenticateAsync() |
Allows derived types to handle authentication. (Inherited from RemoteAuthenticationHandler<TOptions>) |
| HandleAuthenticateOnceAsync() |
Used to ensure HandleAuthenticateAsync is only invoked once. The subsequent calls will return the same authenticate result. (Inherited from AuthenticationHandler<TOptions>) |
| HandleAuthenticateOnceSafeAsync() |
Used to ensure HandleAuthenticateAsync is only invoked once safely. The subsequent calls will return the same authentication result. Any exceptions will be converted into a failed authentication result containing the exception. (Inherited from AuthenticationHandler<TOptions>) |
| HandleChallengeAsync(AuthenticationProperties) |
Responds to a 401 Challenge. Sends an OpenIdConnect message to the 'identity authority' to obtain an identity. |
| HandleForbiddenAsync(AuthenticationProperties) |
Override this method to handle Forbid. (Inherited from RemoteAuthenticationHandler<TOptions>) |
| HandleRemoteAuthenticateAsync() |
Invoked to process incoming OpenIdConnect messages. |
| HandleRemoteSignOutAsync() |
Handles remote sign-out requests sent by the identity provider. |
| HandleRequestAsync() |
Handles the current authentication request. |
| HandleSignOutAsync(SignOutContext) |
Redirect user to the identity provider for sign out |
| HandleSignOutCallbackAsync() |
Response to the callback from OpenId provider after session ended. |
| HandleUnauthorizedAsync(ChallengeContext) |
Responds to a 401 Challenge. Sends an OpenIdConnect message to the 'identity authority' to obtain an identity. |
| InitializeAsync(AuthenticationScheme, HttpContext) |
Initialize the handler, resolve the options and validate them. (Inherited from AuthenticationHandler<TOptions>) |
| InitializeEventsAsync() |
Initializes the events object, called once per request by InitializeAsync(AuthenticationScheme, HttpContext). (Inherited from AuthenticationHandler<TOptions>) |
| InitializeHandlerAsync() |
Called after options/events have been initialized for the handler to finish initializing itself. (Inherited from AuthenticationHandler<TOptions>) |
| RedeemAuthorizationCodeAsync(OpenIdConnectMessage) |
Redeems the authorization code for tokens at the token endpoint. |
| ResolveTarget(String) |
Resolves the scheme that this authentication operation is forwarded to. (Inherited from AuthenticationHandler<TOptions>) |
| ShouldHandleRequestAsync() |
Gets a value that determines if the current authentication request should be handled by HandleRequestAsync(). (Inherited from RemoteAuthenticationHandler<TOptions>) |
| SignOutAsync(AuthenticationProperties) |
Redirect user to the identity provider for sign out |
| ValidateCorrelationId(AuthenticationProperties) |
Validates that the current request correlates with the current remote authentication request. (Inherited from RemoteAuthenticationHandler<TOptions>) |
Applies to
Feedback
Was this page helpful?
