AuthHttpGateway
Assembly: ServiceStack.dll
View Source
public class AuthHttpGateway : IAuthHttpGateway
Fields
Log
View Source
protected static readonly ILog Log
TwitterUserUrl
View Source
public static string TwitterUserUrl
TwitterVerifyCredentialsUrl
View Source
public static string TwitterVerifyCredentialsUrl
FacebookUserUrl
View Source
public static string FacebookUserUrl
FacebookVerifyTokenUrl
View Source
public static string FacebookVerifyTokenUrl
YammerUserUrl
View Source
public static string YammerUserUrl
GithubUserUrl
View Source
public static string GithubUserUrl
GithubUserEmailsUrl
View Source
public static string GithubUserEmailsUrl
Methods
DownloadTwitterUserInfo(String, String, String, String, String)
View Source
public string DownloadTwitterUserInfo(string consumerKey, string consumerSecret, string accessToken, string accessTokenSecret, string twitterUserId)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | consumerKey |
System.String | consumerSecret |
System.String | accessToken |
System.String | accessTokenSecret |
System.String | twitterUserId |
DownloadTwitterUserInfoAsync(String, String, String, String, String, CancellationToken)
View Source
public async Task<string> DownloadTwitterUserInfoAsync(string consumerKey, string consumerSecret, string accessToken, string accessTokenSecret, string twitterUserId, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.String>
Parameters
Type | Name |
---|---|
System.String | consumerKey |
System.String | consumerSecret |
System.String | accessToken |
System.String | accessTokenSecret |
System.String | twitterUserId |
System.Threading.CancellationToken | token |
VerifyTwitterAccessToken(String, String, String, String, out String, out String)
View Source
public bool VerifyTwitterAccessToken(string consumerKey, string consumerSecret, string accessToken, string accessTokenSecret, out string userId, out string email)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | consumerKey |
System.String | consumerSecret |
System.String | accessToken |
System.String | accessTokenSecret |
System.String | userId |
System.String |
VerifyTwitterAccessTokenAsync(String, String, String, String, CancellationToken)
View Source
public async Task<AuthId> VerifyTwitterAccessTokenAsync(string consumerKey, string consumerSecret, string accessToken, string accessTokenSecret, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<ServiceStack.Auth.AuthId>
Parameters
Type | Name |
---|---|
System.String | consumerKey |
System.String | consumerSecret |
System.String | accessToken |
System.String | accessTokenSecret |
System.Threading.CancellationToken | token |
GetJsonFromOAuthUrl(String, String, String, String, String, String)
View Source
public static string GetJsonFromOAuthUrl(string consumerKey, string consumerSecret, string accessToken, string accessTokenSecret, string url, string data = null)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | consumerKey |
System.String | consumerSecret |
System.String | accessToken |
System.String | accessTokenSecret |
System.String | url |
System.String | data |
GetJsonFromOAuthUrlAsync(String, String, String, String, String, String, CancellationToken)
View Source
public static async Task<string> GetJsonFromOAuthUrlAsync(string consumerKey, string consumerSecret, string accessToken, string accessTokenSecret, string url, string data = null, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.String>
Parameters
Type | Name |
---|---|
System.String | consumerKey |
System.String | consumerSecret |
System.String | accessToken |
System.String | accessTokenSecret |
System.String | url |
System.String | data |
System.Threading.CancellationToken | token |
VerifyFacebookAccessToken(String, String)
View Source
public bool VerifyFacebookAccessToken(string appId, string accessToken)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | appId |
System.String | accessToken |
VerifyFacebookAccessTokenAsync(String, String, CancellationToken)
View Source
public async Task<bool> VerifyFacebookAccessTokenAsync(string appId, string accessToken, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Boolean>
Parameters
Type | Name |
---|---|
System.String | appId |
System.String | accessToken |
System.Threading.CancellationToken | token |
DownloadFacebookUserInfo(String, String[])
View Source
public string DownloadFacebookUserInfo(string facebookCode, params string[] fields)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | facebookCode |
System.String[] | fields |
DownloadFacebookUserInfoAsync(String, String[], CancellationToken)
View Source
public async Task<string> DownloadFacebookUserInfoAsync(string facebookCode, string[] fields, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.String>
Parameters
Type | Name |
---|---|
System.String | facebookCode |
System.String[] | fields |
System.Threading.CancellationToken | token |
GetJsonFromGitHub(String, String)
View Source
public string GetJsonFromGitHub(string url, string accessToken)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | url |
System.String | accessToken |
GetJsonFromGitHubAsync(String, String, CancellationToken)
View Source
public async Task<string> GetJsonFromGitHubAsync(string url, string accessToken, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.String>
Parameters
Type | Name |
---|---|
System.String | url |
System.String | accessToken |
System.Threading.CancellationToken | token |
DownloadGithubUserInfo(String)
View Source
public string DownloadGithubUserInfo(string accessToken)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | accessToken |
DownloadGithubUserInfoAsync(String, CancellationToken)
View Source
public Task<string> DownloadGithubUserInfoAsync(string accessToken, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.String>
Parameters
Type | Name |
---|---|
System.String | accessToken |
System.Threading.CancellationToken | token |
DownloadGithubUserEmailsInfo(String)
View Source
public string DownloadGithubUserEmailsInfo(string accessToken)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | accessToken |
DownloadGithubUserEmailsInfoAsync(String, CancellationToken)
View Source
public Task<string> DownloadGithubUserEmailsInfoAsync(string accessToken, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.String>
Parameters
Type | Name |
---|---|
System.String | accessToken |
System.Threading.CancellationToken | token |
DownloadGoogleUserInfo(String)
View Source
public string DownloadGoogleUserInfo(string accessToken)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | accessToken |
DownloadGoogleUserInfoAsync(String, CancellationToken)
View Source
public async Task<string> DownloadGoogleUserInfoAsync(string accessToken, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.String>
Parameters
Type | Name |
---|---|
System.String | accessToken |
System.Threading.CancellationToken | token |
DownloadMicrosoftUserInfo(String)
View Source
public string DownloadMicrosoftUserInfo(string accessToken)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | accessToken |
DownloadMicrosoftUserInfoAsync(String, CancellationToken)
View Source
public async Task<string> DownloadMicrosoftUserInfoAsync(string accessToken, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.String>
Parameters
Type | Name |
---|---|
System.String | accessToken |
System.Threading.CancellationToken | token |
CreateMicrosoftPhotoUrl(String, String)
View Source
public string CreateMicrosoftPhotoUrl(string accessToken, string savePhotoSize = null)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | accessToken |
System.String | savePhotoSize |
CreateMicrosoftPhotoUrlAsync(String, String, CancellationToken)
View Source
public async Task<string> CreateMicrosoftPhotoUrlAsync(string accessToken, string savePhotoSize = null, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.String>
Parameters
Type | Name |
---|---|
System.String | accessToken |
System.String | savePhotoSize |
System.Threading.CancellationToken | token |
DownloadYammerUserInfo(String)
Download Yammer User Info given its ID.
<p> Yammer provides a method to retrieve current user information via "https://www.yammer.com/api/v1/users/current.json". </p> <p> However, to ensure consistency with the rest of the Auth codebase, the explicit URL will be used, where [:id] denotes the User ID: "https://www.yammer.com/api/v1/users/[:id].json" </p> <p> Refer to: https://developer.yammer.com/restapi/ for full documentation. </p>
View Source
public string DownloadYammerUserInfo(string yammerUserId)
Returns
System.String
:
The User info in JSON format.
<p> Yammer provides a method to retrieve current user information via "https://www.yammer.com/api/v1/users/current.json". </p> <p> However, to ensure consistency with the rest of the Auth codebase, the explicit URL will be used, where [:id] denotes the User ID: "https://www.yammer.com/api/v1/users/[:id].json" </p> <p> Refer to: https://developer.yammer.com/restapi/ for full documentation. </p>
Parameters
Type | Name | Description |
---|---|---|
System.String | yammerUserId |
The Yammer User ID.
<p> Yammer provides a method to retrieve current user information via "https://www.yammer.com/api/v1/users/current.json". </p> <p> However, to ensure consistency with the rest of the Auth codebase, the explicit URL will be used, where [:id] denotes the User ID: "https://www.yammer.com/api/v1/users/[:id].json" </p> <p> Refer to: https://developer.yammer.com/restapi/ for full documentation. </p>
|
DownloadYammerUserInfoAsync(String)
View Source
public async Task<string> DownloadYammerUserInfoAsync(string yammerUserId)
Returns
System.Threading.Tasks.Task<System.String>
Parameters
Type | Name |
---|---|
System.String | yammerUserId |