C# Класс inBloomApiLibrary.OAuth

OAuth Functionality
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
CallAuthorization ( string accessToken, string code ) : OAuthResponse

This function is used to check authentication of the user and gives access to api's.

GetAuthorizationUrl ( ) : string

Gets the URL to which users should be redirected for login

SetClientId ( string clientId ) : void

Set the client ID

SetClientSecret ( string clientSecret ) : void

Set the client secret

SetRedirectUrl ( string redirectUrl ) : void

Set the redirect URL

Приватные методы

Метод Описание
GetUserId ( string accessToken ) : string

The session check endpoint doesn't give us the User ID so we have to do a second API call here to the home endpoint and grab the ID from one of the links there This seems like a hack though... Must be a better way of getting it.

Описание методов

CallAuthorization() публичный Метод

This function is used to check authentication of the user and gives access to api's.
public CallAuthorization ( string accessToken, string code ) : OAuthResponse
accessToken string
code string
Результат OAuthResponse

GetAuthorizationUrl() публичный Метод

Gets the URL to which users should be redirected for login
public GetAuthorizationUrl ( ) : string
Результат string

SetClientId() публичный Метод

Set the client ID
public SetClientId ( string clientId ) : void
clientId string
Результат void

SetClientSecret() публичный Метод

Set the client secret
public SetClientSecret ( string clientSecret ) : void
clientSecret string
Результат void

SetRedirectUrl() публичный Метод

Set the redirect URL
public SetRedirectUrl ( string redirectUrl ) : void
redirectUrl string
Результат void