public async Task <IActionResult> ClientCredential(Guid id, AuthenticateFacebookTemplate template)
        {
            JwtAdto jwt = await _authenticationApplicationService.FacebookAsync(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
            })));
        }
Esempio n. 2
0
 public Task <JwtAdto> FacebookAsync(ClientCredentialAdto clientCredentialAdto)
 {
     return(_securityApplicationService.SecureAsync(() => _authenticationApplicationService.FacebookAsync(clientCredentialAdto),
                                                    DefaultAuthorisationContext.Create(AuthorisationResource.Authenticate, AuthorisationAction.Create)));
 }