public async Task <IActionResult> Google(Guid id, AuthenticateGoogleTemplate template)
        {
            JwtAdto jwt = await _authenticationApplicationService.GoogleAsync(new ClientCredentialAdto
            {
                Id          = id,
                Token       = template.Token,
                RedirectUri = template.RedirectUri
            });

            return(Ok(_resourceBuilder.Build(new SessionResource
            {
                Id = jwt.SessionId,
                AuthToken = jwt.AuthToken,
                ExpiresIn = jwt.ExpiresIn
            })));
        }
Exemple #2
0
 public Task <JwtAdto> GoogleAsync(ClientCredentialAdto clientCredentialAdto)
 {
     return(_securityApplicationService.SecureAsync(() => _authenticationApplicationService.GoogleAsync(clientCredentialAdto),
                                                    DefaultAuthorisationContext.Create(AuthorisationResource.Authenticate, AuthorisationAction.Create)));
 }