Class Authorizer

Definition

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

An abstract class to represent various OAuth 2.0 authorization code flows. Refer to http://tools.ietf.org/html/rfc6749 about OAuth 2.0 protocols. Also service provider document needs to be referred for using end points and additional parameters.

C#
Copy
public abstract class Authorizer : IDisposable
Inheritance
Authorizer
Derived
Implements
System.IDisposable

Constructors

View Source

Authorizer()

Constructor for Authoirzer instances

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

Properties

View Source

IsRequestInProgress

Indicates if the current instance is already handling an authorization request

Declaration
C#
Copy
public bool IsRequestInProgress { get; }
Property Value
Type Description
Boolean
API Level: 3

Methods

View Source

AuthorizeAsync(AuthorizationRequest)

Authorizes the client with access toekn / authorizaion code in Implicit and Authorization Code grant flows respectively.

Declaration
C#
Copy
[Obsolete("This API is deprecated since API Level 5, no longer supported")] public virtual Task<AuthorizationResponse> AuthorizeAsync(AuthorizationRequest request)
Parameters
Type Name Description
AuthorizationRequest request

An authorization request

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

The authorization response from server

API Level: 3
View Source

Dispose()

Releases any unmanaged resources used by this object.

Declaration
C#
Copy
public void Dispose()
API Level: 3
View Source

Dispose(Boolean)

Releases any unmanaged resources used by this object. Can also dispose any other disposable objects.

Declaration
C#
Copy
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
Boolean disposing

If true, disposes any disposable objects. If false, does not dispose disposable objects.

API Level: 3
View Source

Finalize()

Destructor of the Authorizer class.

Declaration
C#
Copy
protected void Finalize()
API Level: 3
View Source

GetAccessTokenAsync(TokenRequest)

Gets the access token in OAuth2 supported grant flows except Implicit Grant flow.

Declaration
C#
Copy
[Obsolete("This API is deprecated since API Level 5, no longer supported")] public virtual Task<TokenResponse> GetAccessTokenAsync(TokenRequest request)
Parameters
Type Name Description
TokenRequest request

A token request

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

The response from server

API Level: 3
View Source

RefreshAccessTokenAsync(RefreshTokenRequest)

Retrieves access token using a refresh token.

Declaration
C#
Copy
public virtual Task<TokenResponse> RefreshAccessTokenAsync(RefreshTokenRequest request)
Parameters
Type Name Description
RefreshTokenRequest request

Request containing refresh token

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

The response containing access token.

Exceptions
Type Condition
System.ArgumentException

Thrown when method failed due to invalid argumets

OAuth2Exception

Thrown when method fails due to server error

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

Implements

System.IDisposable