OAuthBearerAuthenticationOptions Class
Options class provides information needed to control Bearer Authentication middleware behavior
Namespace: Microsoft.Owin.Security.OAuth
Assembly: Microsoft.Owin.Security.OAuth (in Microsoft.Owin.Security.OAuth.dll)
Inheritance Hierarchy
System.Object
Microsoft.Owin.Security.AuthenticationOptions
Microsoft.Owin.Security.OAuth.OAuthBearerAuthenticationOptions
Syntax
public class OAuthBearerAuthenticationOptions : AuthenticationOptions
public ref class OAuthBearerAuthenticationOptions : AuthenticationOptions
type OAuthBearerAuthenticationOptions =
class
inherit AuthenticationOptions
end
Public Class OAuthBearerAuthenticationOptions
Inherits AuthenticationOptions
Constructors
Name | Description | |
---|---|---|
OAuthBearerAuthenticationOptions() | Creates an instance of bearer authentication options with default values. |
Properties
Name | Description | |
---|---|---|
AccessTokenFormat | The data format used to un-protect the information contained in the access token. If not provided by the application the default data protection provider depends on the host server. The SystemWeb host on IIS will use ASP.NET machine key data protection, and HttpListener and other self-hosted servers will use DPAPI data protection. If a different access token provider or format is assigned, a compatible instance must be assigned to the OAuthAuthorizationServerOptions.AccessTokenProvider and OAuthAuthorizationServerOptions.AccessTokenFormat of the authorization server. |
|
AccessTokenProvider | Receives the bearer token the client application will be providing to web application. If not provided the token produced on the server's default data protection by using the AccessTokenFormat. If a different access token provider or format is assigned, a compatible instance must be assigned to the OAuthAuthorizationServerOptions.AccessTokenProvider and OAuthAuthorizationServerOptions.AccessTokenFormat of the authorization server. |
|
AuthenticationMode | If Active the authentication middleware alter the request user coming in and alter 401 Unauthorized responses going out. If Passive the authentication middleware will only provide identity and alter responses when explicitly indicated by the AuthenticationType.(Inherited from AuthenticationOptions.) |
|
AuthenticationType | The AuthenticationType in the options corresponds to the IIdentity AuthenticationType property. A different value may be assigned in order to use the same authentication middleware type more than once in a pipeline.(Inherited from AuthenticationOptions.) |
|
Challenge | Specifies the full challenge to send to the client, and should start with "Bearer". If a challenge is provided then the Realm property is ignored. If no challenge is specified then one is created using "Bearer" and the value of the Realm property. |
|
Description | Additional information about the authentication type which is made available to the application.(Inherited from AuthenticationOptions.) |
|
Provider | The object provided by the application to process events raised by the bearer authentication middleware. The application may implement the interface fully, or it may create an instance of OAuthBearerAuthenticationProvider and assign delegates only to the events it wants to process. |
|
Realm | Determines what realm value is included when the bearer middleware adds a response header to an unauthorized request. If not assigned, the response header does not have a realm. |
|
SystemClock | Used to know what the current clock time is when calculating or validating token expiration. When not assigned default is based on DateTimeOffset.UtcNow. This is typically needed only for unit testing. |
Methods
Name | Description | |
---|---|---|
Equals(Object) | (Inherited from Object.) |
|
Finalize() | (Inherited from Object.) |
|
GetHashCode() | (Inherited from Object.) |
|
GetType() | (Inherited from Object.) |
|
MemberwiseClone() | (Inherited from Object.) |
|
ToString() | (Inherited from Object.) |
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
Microsoft.Owin.Security.OAuth Namespace
Return to top