C# Class Foretagsplatsen.Api2.OAuthService

Företagsplatsen OAuth service
显示文件 Open project: foretagsplatsen/Foretagsplatsen-DotNet-API

Public Methods

Method Description
Authorize ( string username, string password ) : string

Authorize using Foretagsplatsen xAuth inspired method intended for browser-less applications.

CreateSession ( OAuthCredentials credentials, string oAuthBaseUrl, string callbackUrl ) : IOAuthSession
GetAccessToken ( string username, string verifier ) : OAuthCredentials

Exchanges a request token for an access token.

GetAccessTokenEndpointUrl ( string oAuthBaseUrl ) : string
GetAuthorizeEndpointUrl ( string oAuthBaseUrl ) : string
GetAuthorizeUrl ( ) : string

The authorize step is where you send the user to a page on Företagsplatsen.se that will allow them to grant your application privileges to use their account with the API.

GetAuthorizeUrl ( string callback ) : string

The authorize step is where you send the user to a page on Företagsplatsen.se that will allow them to grant your application privileges to use their account with the API.

GetCredentials ( string username, string password ) : OAuthCredentials

Perform all necessary steps (RequestToken, Authorize, AccessToken) to get credentials.

GetRequestToken ( ) : void

The first step to authenticating a user is to obtain a request token from Företagsplatsen. This step serves two purposes: First, to tell Företagsplatsen what you're about to do. Second, to tell Företagsplatsen what you want to do for the OAuth callback.

GetRequestTokenEndpointUrl ( string oAuthBaseUrl ) : string
OAuthService ( string consumerKey, string consumerSecret ) : System
OAuthService ( string consumerKey, string consumerSecret, string baseUrl, string callbackUrl ) : System

Method Details

Authorize() public method

Authorize using Foretagsplatsen xAuth inspired method intended for browser-less applications.
public Authorize ( string username, string password ) : string
username string Username for user
password string Password for user.
return string

CreateSession() public static method

public static CreateSession ( OAuthCredentials credentials, string oAuthBaseUrl, string callbackUrl ) : IOAuthSession
credentials OAuthCredentials
oAuthBaseUrl string
callbackUrl string
return IOAuthSession

GetAccessToken() public method

Exchanges a request token for an access token.
public GetAccessToken ( string username, string verifier ) : OAuthCredentials
username string username for user.
verifier string OAuth verifier
return OAuthCredentials

GetAccessTokenEndpointUrl() public static method

public static GetAccessTokenEndpointUrl ( string oAuthBaseUrl ) : string
oAuthBaseUrl string
return string

GetAuthorizeEndpointUrl() public static method

public static GetAuthorizeEndpointUrl ( string oAuthBaseUrl ) : string
oAuthBaseUrl string
return string

GetAuthorizeUrl() public method

The authorize step is where you send the user to a page on Företagsplatsen.se that will allow them to grant your application privileges to use their account with the API.
public GetAuthorizeUrl ( ) : string
return string

GetAuthorizeUrl() public method

The authorize step is where you send the user to a page on Företagsplatsen.se that will allow them to grant your application privileges to use their account with the API.
public GetAuthorizeUrl ( string callback ) : string
callback string Callback Url. The authorization page will redirect the user to this page on sucessful authorization.
return string

GetCredentials() public method

Perform all necessary steps (RequestToken, Authorize, AccessToken) to get credentials.
public GetCredentials ( string username, string password ) : OAuthCredentials
username string Username for user
password string Password for user.
return OAuthCredentials

GetRequestToken() public method

The first step to authenticating a user is to obtain a request token from Företagsplatsen. This step serves two purposes: First, to tell Företagsplatsen what you're about to do. Second, to tell Företagsplatsen what you want to do for the OAuth callback.
public GetRequestToken ( ) : void
return void

GetRequestTokenEndpointUrl() public static method

public static GetRequestTokenEndpointUrl ( string oAuthBaseUrl ) : string
oAuthBaseUrl string
return string

OAuthService() public method

public OAuthService ( string consumerKey, string consumerSecret ) : System
consumerKey string
consumerSecret string
return System

OAuthService() public method

public OAuthService ( string consumerKey, string consumerSecret, string baseUrl, string callbackUrl ) : System
consumerKey string
consumerSecret string
baseUrl string
callbackUrl string
return System