Share via


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
System_CAPS_pubmethod OAuthBearerAuthenticationOptions()

Creates an instance of bearer authentication options with default values.

Properties

Name Description
System_CAPS_pubproperty 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.

System_CAPS_pubproperty 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.

System_CAPS_pubproperty 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.)

System_CAPS_pubproperty 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.)

System_CAPS_pubproperty 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.

System_CAPS_pubproperty Description

Additional information about the authentication type which is made available to the application.(Inherited from AuthenticationOptions.)

System_CAPS_pubproperty 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.

System_CAPS_pubproperty 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.

System_CAPS_pubproperty 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
System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod 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