C# Класс Foretagsplatsen.Api2.OAuthService

Företagsplatsen OAuth service
Показать файл Открыть проект

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

Метод Описание
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

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

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

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.
Результат string

CreateSession() публичный статический Метод

public static CreateSession ( OAuthCredentials credentials, string oAuthBaseUrl, string callbackUrl ) : IOAuthSession
credentials OAuthCredentials
oAuthBaseUrl string
callbackUrl string
Результат IOAuthSession

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

Exchanges a request token for an access token.
public GetAccessToken ( string username, string verifier ) : OAuthCredentials
username string username for user.
verifier string OAuth verifier
Результат OAuthCredentials

GetAccessTokenEndpointUrl() публичный статический Метод

public static GetAccessTokenEndpointUrl ( string oAuthBaseUrl ) : string
oAuthBaseUrl string
Результат string

GetAuthorizeEndpointUrl() публичный статический Метод

public static GetAuthorizeEndpointUrl ( string oAuthBaseUrl ) : string
oAuthBaseUrl string
Результат string

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

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
Результат string

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

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.
Результат string

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

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.
Результат OAuthCredentials

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

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
Результат void

GetRequestTokenEndpointUrl() публичный статический Метод

public static GetRequestTokenEndpointUrl ( string oAuthBaseUrl ) : string
oAuthBaseUrl string
Результат string

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

public OAuthService ( string consumerKey, string consumerSecret ) : System
consumerKey string
consumerSecret string
Результат System

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

public OAuthService ( string consumerKey, string consumerSecret, string baseUrl, string callbackUrl ) : System
consumerKey string
consumerSecret string
baseUrl string
callbackUrl string
Результат System