Microsoft.Security.Authentication.OAuth Namespace

The Microsoft.Security.Authentication.OAuth namespace provides classes and methods for OAuth 2.0 authentication.

Classes

AuthFailure

A class that provides the failure object of an authorization request.

Note

This is null in case of a valid AuthResponse and available following failed authorization requests.

AuthRequestParams

A class that provides methods to create an authorization request parameter object.

Note

This object is used to request authorization code from the server when response_type is code and access_token when response_type is token. The response_type is described in section 3.1.1 of RFC 6749.

AuthRequestResult

A class that provides the result of an authorization request.

AuthResponse

A class that provides the response of an authorization request described by the section section 4.1.2 and 4.2.2 of RFC 6749.

ClientAuthentication

A class that provides methods to create a client authentication object for basic authorization of the client to the authorization server.

Note

This class is used to authenticate the client application to the authorization server. It isn't used to authenticate the user to the client application. User authentication is handled by the RequestAuthWithParamsAsync method of the OAuth2Manager class.

OAuth2Manager

A static class that provides methods to initiate an authorization request, complete an authorization request, and request an access token for a user through a client app.

Note

Client app refers to the OAuth 2.0 registered application. User refers to the end-user who is the resource owner and is authorizing the client application to access their resources.

TokenFailure

A class that provides the failure object of a token request.

TokenRequestParams

A class that provides methods to create a token request parameter object. This is described by the section 4.1.3 of RFC 6749.

Note

This object is used to request an access_token from the server.

TokenRequestResult

A class that provides the result of a token request.

TokenResponse

A class that provides the response of a token request. This is described by sections 4.1.4 and 4.2.2 of RFC 6749.

Enums

CodeChallengeMethodKind

An enum that specifies the code_challenge_method as described by section 4.3 of RFC 7636 : Proof Key for Code Exchange by OAuth Public Clients.

TokenFailureKind

An enum that specifies the kind of token failure that occurred.