C# Class Sequencing.WeatherApp.Controllers.OAuth.AuthWorker

AuthWorker class is responsible for working with OAuth authorization server, retrieving access tokens and refreshing them
Show file Open project: SequencingDOTcom/Weather-My-Way-RTP-app Class Usage Examples

Public Methods

Method Description
AuthWorker ( string oAuthUrl, string redirectUrl, string secret, string appId ) : System
GetAuthInfo ( string code ) : AuthInfo

Second step in OAuth initial authorization sequence.

GetAuthUrl ( ) : string

Retrieves OAuth initial authorization url. Url on which browser should be redirected to.

GetUserInfo ( string token ) : DrupalOAuthInfo

Returns user name for given token

RefreshToken ( string refreshToken ) : AuthInfo

Refreshes existing token

Private Methods

Method Description
CreateRq ( ) : HttpWebRequest

Method Details

AuthWorker() public method

public AuthWorker ( string oAuthUrl, string redirectUrl, string secret, string appId ) : System
oAuthUrl string
redirectUrl string
secret string
appId string
return System

GetAuthInfo() public method

Second step in OAuth initial authorization sequence.
public GetAuthInfo ( string code ) : AuthInfo
code string code parameter acquired from OAuth server
return AuthInfo

GetAuthUrl() public method

Retrieves OAuth initial authorization url. Url on which browser should be redirected to.
public GetAuthUrl ( ) : string
return string

GetUserInfo() public method

Returns user name for given token
public GetUserInfo ( string token ) : DrupalOAuthInfo
token string OAuth auth token
return DrupalOAuthInfo

RefreshToken() public method

Refreshes existing token
public RefreshToken ( string refreshToken ) : AuthInfo
refreshToken string OAuth refresh token
return AuthInfo