Class CodeGrantAuthorizer

Definition

Namespace:
Tizen.Account.OAuth2
Assembly:
Tizen.Account.OAuth2.dll
API Level:
3

The CodeGrantAuthorizer is used to obtain access tokens and refresh tokens using Authorization Code Grant flow as described at https://tools.ietf.org/html/rfc6749#section-4.1

C#
Copy
public class CodeGrantAuthorizer : Authorizer
Inheritance
CodeGrantAuthorizer

Constructors

View Source

CodeGrantAuthorizer()

The constructor

Declaration
C#
Copy
public CodeGrantAuthorizer()
API Level: 3

Methods

View Source

GetAccessTokenAsync(TokenRequest)

Retrieves access token by exchanging authorization code received using AuthorizeAsync(AuthorizationRequest). The authroization request parameters should be as defined in https://tools.ietf.org/html/rfc6749#section-4.1.3

Declaration
C#
Copy
public Task<TokenResponse> GetAccessTokenAsync(TokenRequest request)
Parameters
Type Name Description
TokenRequest request

The token request CodeGrantTokenRequest

Returns
Type Description
Task<TokenResponse>

The response containing access token.

Exceptions
Type Condition
OAuth2Exception

Thrown when method fails due to server error

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/internet

Extension Methods