Skip to main content

Class AuthorizationAccessToken

Namespace: SuperOffice.WebApi.Authorization
Assembly: SuperOffice.WebApi.Authorization.AccessToken.dll
OAuth 2.0 access token (and refresh token) <xref href=“SuperOffice.WebApi.Authorization.IAuthorization” data-throw-if-not-resolved=“false”></xref>. With a refresh token, AppToken and AppSecret defined we can automatically refresh access token on expiry.

Inheritance

objectAuthorizationAccessToken

Implements

IAuthorization

Inherited Members

object.ToString(), object.Equals(object), object.Equals(object, object), object.ReferenceEquals(object, object), object.GetHashCode(), object.GetType(), object.MemberwiseClone()

Constructors

AuthorizationAccessToken(string)

AccessTokenAuthorization Constructor. Using this constructor will not renew an access token when it has expired.

Parameters

accessToken string An OAuth 2.0 access_token.

AuthorizationAccessToken(string, string, string, string, string, string)

AccessTokenAuthorization Constructor. This will attempt to renew the access token when it has expired.

Parameters

accessToken string An OAuth 2.0 access_token. refreshToken string Refresh token that can be used to get a new access token. clientId string Client identifier, equal to OAuth client_id. clientSecret string CLient Secret, equal to Oauth client_secret. This is required for WebApps, but not for Native/Mobile apps. redirectUrl string Redirect URL registered to your app subdomain string Determines CRM online subdomain, i.e. sod, qastage or online.

AuthorizationAccessToken(string, string, string, string, string)

AccessTokenAuthorization Constructor. This will attempt to renew the access token when it has expired for Native/Mobile apps, which don’t require a ClientSecret.

Parameters

accessToken string An OAuth 2.0 access_token. refreshToken string Refresh token that can be used to get a new access token. clientId string Client identifier, equal to OAuth client_id. redirectUrl string Redirect URL registered to your app subdomain string Determines CRM online subdomain, i.e. sod, qastage or online.

Properties

AccessToken

OAuth access_token value.

Property Value

string

ClientId

OAuth client_id value.

Property Value

string

ClientSecret

OAuth client_secret value.

Property Value

string

IdToken

OAuth id_token value.

Property Value

string

RedirectUrl

OAuth redirect_uri value.

Property Value

string

RefreshAuthorizationAsync

Try to refresh this <xref href=“SuperOffice.WebApi.Authorization.IAuthorization” data-throw-if-not-resolved=“false”></xref> instance.

Property Value

Func<ReAuthorizationArgs, Task<IAuthorization&gt;&gt;

RefreshToken

OAuth refresh_token value.

Property Value

string

SubDomain

SuperOffice CRM Online subdomain; SOD, Stage, Production.

Property Value

string

Methods

GetAuthorization()

Gets a tuple that represents authorization scheme and parameter.

Returns

AuthenticationHeaderValue Gets a <xref href=“System.Tuple%602” data-throw-if-not-resolved=“false”></xref> (string,string) where scheme is Bearer and parameter is the access token.