Class CodeGrantAuthorizer

    Definition

    Namespace:
    Tizen.Account.OAuth2
    Assembly:
    Tizen.Account.OAuth2.dll

    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

    public class CodeGrantAuthorizer : Authorizer, IDisposable
    Inheritance
    object
    Authorizer
    CodeGrantAuthorizer
    Implements
    System.IDisposable

    Constructors

    View Source

    CodeGrantAuthorizer()

    The constructor

    Declaration
    public CodeGrantAuthorizer()

    Methods

    View Source

    AuthorizeAsync(AuthorizationRequest)

    Retrieves authorization code asynchronously. The authroization request parameters should be as defined in https://tools.ietf.org/html/rfc6749#section-4.1.1

    Declaration
    public override Task<AuthorizationResponse> AuthorizeAsync(AuthorizationRequest request)
    Parameters
    Type Name Description
    AuthorizationRequest request

    The authorization request CodeGrantAuthorizationRequest

    Returns
    Type Description
    System.Threading.Tasks.Task<TResult><AuthorizationResponse>

    The response containing authorization code.

    Overrides
    Authorizer.AuthorizeAsync(AuthorizationRequest)
    Exceptions
    Type Condition
    System.ArgumentException

    Thrown when method failed due to invalid argumets

    OAuth2Exception

    Thrown when method fails due to server error

    View Source

    ClearCache()

    Clear the cache

    Declaration
    public void ClearCache()
    View Source

    ClearCookies()

    Clears the cookies

    Declaration
    public void ClearCookies()
    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
    public override Task<TokenResponse> GetAccessTokenAsync(TokenRequest request)
    Parameters
    Type Name Description
    TokenRequest request

    The token request CodeGrantTokenRequest

    Returns
    Type Description
    System.Threading.Tasks.Task<TResult><TokenResponse>

    The response containing access token.

    Overrides
    Authorizer.GetAccessTokenAsync(TokenRequest)
    Exceptions
    Type Condition
    System.ArgumentException

    Thrown when method failed due to invalid argumets

    OAuth2Exception

    Thrown when method fails due to server error

    Implements

    System.IDisposable
    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX