C# Class Tailspin.Surveys.Web.Security.AuthenticationContextExtensions

ファイルを表示 Open project: Azure-Samples/guidance-identity-management-for-multitenant-apps

Public Methods

Method Description
AcquireTokenByAuthorizationCodeAsync ( this authenticationContext, string authorizationCode, Uri redirectUri, AdalCredential credentials, string resource ) : Task

Acquires security token from the authority using an authorization code previously received. This method does not lookup token cache, but stores the result in it, so it can be looked up using other methods such as M:Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.AcquireTokenSilentAsync(System.String,System.String,Microsoft.IdentityModel.Clients.ActiveDirectory.UserIdentifier).

AcquireTokenSilentAsync ( this authenticationContext, string resource, AdalCredential credentials, Microsoft.IdentityModel.Clients.ActiveDirectory.UserIdentifier userId ) : Task

Acquires security token without asking for user credential.

Method Details

AcquireTokenByAuthorizationCodeAsync() public static method

Acquires security token from the authority using an authorization code previously received. This method does not lookup token cache, but stores the result in it, so it can be looked up using other methods such as M:Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.AcquireTokenSilentAsync(System.String,System.String,Microsoft.IdentityModel.Clients.ActiveDirectory.UserIdentifier).
public static AcquireTokenByAuthorizationCodeAsync ( this authenticationContext, string authorizationCode, Uri redirectUri, AdalCredential credentials, string resource ) : Task
authenticationContext this The instance to use for token acquisition.
authorizationCode string The authorization code received from service authorization endpoint.
redirectUri System.Uri The redirect address used for obtaining authorization code.
credentials AdalCredential A instance containing the credentials to use for token acquisition.
resource string Identifier of the target resource that is the recipient of the requested token. It can be null if provided earlier to acquire authorizationCode.
return Task

AcquireTokenSilentAsync() public static method

Acquires security token without asking for user credential.
public static AcquireTokenSilentAsync ( this authenticationContext, string resource, AdalCredential credentials, Microsoft.IdentityModel.Clients.ActiveDirectory.UserIdentifier userId ) : Task
authenticationContext this The instance to use for token acquisition.
resource string Identifier of the target resource that is the recipient of the requested token.
credentials AdalCredential A instance containing the credentials to use for token acquisition.
userId Microsoft.IdentityModel.Clients.ActiveDirectory.UserIdentifier Identifier of the user token is requested for. This parameter can be .Any.
return Task