C# Class inBloomApiLibrary.OAuth

OAuth Functionality
Afficher le fichier Open project: upeo/inbloom-dotnet Class Usage Examples

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
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.

Method Details

CallAuthorization() public méthode

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
Résultat OAuthResponse

GetAuthorizationUrl() public méthode

Gets the URL to which users should be redirected for login
public GetAuthorizationUrl ( ) : string
Résultat string

SetClientId() public méthode

Set the client ID
public SetClientId ( string clientId ) : void
clientId string
Résultat void

SetClientSecret() public méthode

Set the client secret
public SetClientSecret ( string clientSecret ) : void
clientSecret string
Résultat void

SetRedirectUrl() public méthode

Set the redirect URL
public SetRedirectUrl ( string redirectUrl ) : void
redirectUrl string
Résultat void