C# Class inBloomApiLibrary.OAuth

OAuth Functionality
Datei anzeigen Open project: upeo/inbloom-dotnet Class Usage Examples

Public Methods

Method 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

Method 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 method

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
return OAuthResponse

GetAuthorizationUrl() public method

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

SetClientId() public method

Set the client ID
public SetClientId ( string clientId ) : void
clientId string
return void

SetClientSecret() public method

Set the client secret
public SetClientSecret ( string clientSecret ) : void
clientSecret string
return void

SetRedirectUrl() public method

Set the redirect URL
public SetRedirectUrl ( string redirectUrl ) : void
redirectUrl string
return void