AuthenticateAsync() public method

public AuthenticateAsync ( Frapid.Account.InputModels.GoogleAccount account, RemoteUser user ) : Task
account Frapid.Account.InputModels.GoogleAccount
user Frapid.Areas.RemoteUser
return Task
Exemplo n.º 1
0
 public async Task<ActionResult> GoogleSignInAsync(GoogleAccount account)
 {
     try
     {
         var oauth = new GoogleAuthentication(this.Tenant);
         var result = await oauth.AuthenticateAsync(account, this.RemoteUser).ConfigureAwait(false);
         return await this.OnAuthenticatedAsync(result).ConfigureAwait(true);
     }
     catch(NpgsqlException)
     {
         return this.AccessDenied();
     }
 }
 public async Task<ActionResult> GoogleSignInAsync(GoogleAccount account)
 {
     try
     {
         var oauth = new GoogleAuthentication();
         var result =
             await oauth.AuthenticateAsync(account, this.RemoteUser);
         return OnAuthenticated(result);
     }
     catch (NpgsqlException)
     {
         return Json("Access is denied.");
     }
 }