public async Task <GoogleAdto> GetAsync(GetGoogleAdto getGoogleAdto)
        {
            using (ITransaction transaction = _transactionManager.Create())
            {
                if (!(await _queryRepository.GetByIdAsync(getGoogleAdto.Id) is AuthenticationGrantTypeGoogle authenticationGrantTypeGoogle))
                {
                    throw new BusinessApplicationException(ExceptionType.NotFound, "Authentication service not found");
                }

                transaction.Commit();

                return(CreateGoogleAdto(authenticationGrantTypeGoogle));
            }
        }
Beispiel #2
0
 public Task <GoogleAdto> GetAsync(GetGoogleAdto getGoogleAdto)
 {
     return(_securityApplicationService.SecureAsync(() => _googleAuthenticationServiceApplicationService.GetAsync(getGoogleAdto),
                                                    DefaultAuthorisationContext.Create(AuthorisationResource.AuthenticationService, AuthorisationAction.Get)));
 }