public static GetAccessToken ( |
||
contextToken | Context token issued by the intended access token audience | |
targetHost | string | Url authority of the target principal |
return | OAuth2AccessTokenResponse |
public static OAuth2AccessTokenResponse GetAccessToken(SharePointContextToken contextToken, string targetHost)
{
string targetPrincipalName = contextToken.TargetPrincipalName;
// Extract the refreshToken from the context token
string refreshToken = contextToken.RefreshToken;
if (String.IsNullOrEmpty(refreshToken))
{
return null;
}
string targetRealm = Realm ?? contextToken.Realm;
return GetAccessToken(refreshToken,
targetPrincipalName,
targetHost,
targetRealm);
}
TokenHelper::GetAccessToken ( string refreshToken, string targetPrincipalName, string targetHost, string targetRealm ) : OAuth2AccessTokenResponse | |
TokenHelper::GetAccessToken ( string authorizationCode, string targetPrincipalName, string targetHost, string targetRealm, |