BearerTokenOptions Class
Definition
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.
Contains the options used to authenticate using opaque bearer tokens.
public sealed class BearerTokenOptions : Microsoft.AspNetCore.Authentication.AuthenticationSchemeOptions
type BearerTokenOptions = class
inherit AuthenticationSchemeOptions
Public NotInheritable Class BearerTokenOptions
Inherits AuthenticationSchemeOptions
- Inheritance
Constructors
BearerTokenOptions() |
Constructs the options used to authenticate using opaque bearer tokens. |
Properties
BearerTokenExpiration |
Controls how much time the bearer token will remain valid from the point it is created. The expiration information is stored in the protected token. Because of that, an expired token will be rejected even if it is passed to the server after the client should have purged it. |
BearerTokenProtector |
If set, the BearerTokenProtector is used to protect and unprotect the identity and other properties which are stored in the bearer token. If not provided, one will be created using TicketDataFormat and the IDataProtectionProvider from the application IServiceProvider. |
ClaimsIssuer |
Gets or sets the issuer that should be used for any claims that are created (Inherited from AuthenticationSchemeOptions) |
Events |
The object provided by the application to process events raised by the bearer token authentication handler. The application may implement the interface fully, or it may create an instance of BearerTokenEvents and assign delegates only to the events it wants to process. |
EventsType |
If set, will be used as the service type to get the Events instance instead of the property. (Inherited from AuthenticationSchemeOptions) |
ForwardAuthenticate |
If set, this specifies the target scheme that this scheme should forward AuthenticateAsync calls to. For example Context.AuthenticateAsync("ThisScheme") => Context.AuthenticateAsync("ForwardAuthenticateValue"); Set the target to the current scheme to disable forwarding and allow normal processing. (Inherited from AuthenticationSchemeOptions) |
ForwardChallenge |
If set, this specifies the target scheme that this scheme should forward ChallengeAsync calls to. For example Context.ChallengeAsync("ThisScheme") => Context.ChallengeAsync("ForwardChallengeValue"); Set the target to the current scheme to disable forwarding and allow normal processing. (Inherited from AuthenticationSchemeOptions) |
ForwardDefault |
If set, this specifies a default scheme that authentication handlers should forward all authentication operations to by default. The default forwarding logic will check the most specific ForwardAuthenticate/Challenge/Forbid/SignIn/SignOut setting first, followed by checking the ForwardDefaultSelector, followed by ForwardDefault. The first non null result will be used as the target scheme to forward to. (Inherited from AuthenticationSchemeOptions) |
ForwardDefaultSelector |
Used to select a default scheme for the current request that authentication handlers should forward all authentication operations to by default. The default forwarding logic will check the most specific ForwardAuthenticate/Challenge/Forbid/SignIn/SignOut setting first, followed by checking the ForwardDefaultSelector, followed by ForwardDefault. The first non null result will be used as the target scheme to forward to. (Inherited from AuthenticationSchemeOptions) |
ForwardForbid |
If set, this specifies the target scheme that this scheme should forward ForbidAsync calls to. For example Context.ForbidAsync("ThisScheme") => Context.ForbidAsync("ForwardForbidValue"); Set the target to the current scheme to disable forwarding and allow normal processing. (Inherited from AuthenticationSchemeOptions) |
ForwardSignIn |
If set, this specifies the target scheme that this scheme should forward SignInAsync calls to. For example Context.SignInAsync("ThisScheme") => Context.SignInAsync("ForwardSignInValue"); Set the target to the current scheme to disable forwarding and allow normal processing. (Inherited from AuthenticationSchemeOptions) |
ForwardSignOut |
If set, this specifies the target scheme that this scheme should forward SignOutAsync calls to. For example Context.SignOutAsync("ThisScheme") => Context.SignOutAsync("ForwardSignOutValue"); Set the target to the current scheme to disable forwarding and allow normal processing. (Inherited from AuthenticationSchemeOptions) |
RefreshTokenExpiration |
Controls how much time the refresh token will remain valid from the point it is created. The expiration information is stored in the protected token. |
RefreshTokenProtector |
If set, the RefreshTokenProtector is used to protect and unprotect the identity and other properties which are stored in the refresh token. If not provided, one will be created using TicketDataFormat and the IDataProtectionProvider from the application IServiceProvider. |
TimeProvider |
Used for testing. (Inherited from AuthenticationSchemeOptions) |
Methods
Validate() |
Check that the options are valid. Should throw an exception if things are not ok. (Inherited from AuthenticationSchemeOptions) |
Validate(String) |
Checks that the options are valid for a specific scheme (Inherited from AuthenticationSchemeOptions) |