OAuthBearerAuthenticationExtensions.UseOAuthBearerAuthentication Method (IAppBuilder, OAuthBearerAuthenticationOptions)
Adds Bearer token processing to an OWIN application pipeline. This middleware understands appropriately formatted and secured tokens which appear in the request header. If the Options.AuthenticationMode is Active, the claims within the bearer token are added to the current request's IPrincipal User. If the Options.AuthenticationMode is Passive, then the current request is not modified, but IAuthenticationManager AuthenticateAsync may be used at any time to obtain the claims from the request's bearer token. See also http://tools.ietf.org/html/rfc6749
Namespace: Owin
Assembly: Microsoft.Owin.Security.OAuth (in Microsoft.Owin.Security.OAuth.dll)
Syntax
public static IAppBuilder UseOAuthBearerAuthentication(
this IAppBuilder app,
OAuthBearerAuthenticationOptions options
)
public:
[ExtensionAttribute]
static IAppBuilder^ UseOAuthBearerAuthentication(
IAppBuilder^ app,
OAuthBearerAuthenticationOptions^ options
)
static member UseOAuthBearerAuthentication :
app:IAppBuilder *
options:OAuthBearerAuthenticationOptions -> IAppBuilder
<ExtensionAttribute>
Public Shared Function UseOAuthBearerAuthentication (
app As IAppBuilder,
options As OAuthBearerAuthenticationOptions
) As IAppBuilder
Parameters
app
Type: Owin.IAppBuilderThe web application builder
options
Type: Microsoft.Owin.Security.OAuth.OAuthBearerAuthenticationOptionsOptions which control the processing of the bearer header.
Return Value
Type: Owin.IAppBuilder
The application builder
See Also
OAuthBearerAuthenticationExtensions Class
Owin Namespace
Return to top