C# Class SalesForceSignIn.SalesforceClient

The Microsoft account client.
Inheritance: DotNetOpenAuth.AspNet.Clients.OAuth2Client
显示文件 Open project: Teleopti/authbridge Class Usage Examples

Public Methods

Method Description
SalesforceClient ( string appId, string appSecret ) : System

Initializes a new instance of the MicrosoftClient class. Requests a scope of "wl.basic" by default, but "wl.signin" is a good minimal alternative.

Protected Methods

Method Description
GetServiceLoginUrl ( Uri returnUrl ) : Uri

Gets the full url pointing to the login page for this client. The url should include the specified return url so that when the login completes, user is redirected back to that url.

GetUserData ( string accessToken ) : string>.IDictionary

Given the access token, gets the logged-in user's data. The returned dictionary must include two keys 'id', and 'username'.

QueryAccessToken ( Uri returnUrl, string authorizationCode ) : string

Queries the access token from the specified authorization code.

SalesforceClient ( string providerName, string appId, string appSecret, string requestedScopes ) : System

Initializes a new instance of the MicrosoftClient class.

Method Details

GetServiceLoginUrl() protected method

Gets the full url pointing to the login page for this client. The url should include the specified return url so that when the login completes, user is redirected back to that url.
protected GetServiceLoginUrl ( Uri returnUrl ) : Uri
returnUrl System.Uri The return URL.
return System.Uri

GetUserData() protected method

Given the access token, gets the logged-in user's data. The returned dictionary must include two keys 'id', and 'username'.
protected GetUserData ( string accessToken ) : string>.IDictionary
accessToken string /// The access token of the current user. ///
return string>.IDictionary

QueryAccessToken() protected method

Queries the access token from the specified authorization code.
protected QueryAccessToken ( Uri returnUrl, string authorizationCode ) : string
returnUrl System.Uri /// The return URL. ///
authorizationCode string /// The authorization code. ///
return string

SalesforceClient() public method

Initializes a new instance of the MicrosoftClient class. Requests a scope of "wl.basic" by default, but "wl.signin" is a good minimal alternative.
public SalesforceClient ( string appId, string appSecret ) : System
appId string The app id.
appSecret string The app secret.
return System

SalesforceClient() protected method

Initializes a new instance of the MicrosoftClient class.
protected SalesforceClient ( string providerName, string appId, string appSecret, string requestedScopes ) : System
providerName string The provider name.
appId string The app id.
appSecret string The app secret.
requestedScopes string One or more requested scopes.
return System