public async Task <IActionResult> Password(PasswordTemplate passwordTemplate) { JwtAdto jwt = await _authenticationApplicationService.PasswordAsync(new PasswordAdto { Identifier = passwordTemplate.Identifier, Password = passwordTemplate.Password }); return(Ok(_resourceBuilder.Build(new SessionResource { Id = jwt.SessionId, AuthToken = jwt.AuthToken, ExpiresIn = jwt.ExpiresIn }))); }
public Task <JwtAdto> PasswordAsync(PasswordAdto passwordAdto) { return(_securityApplicationService.SecureAsync(() => _authenticationApplicationService.PasswordAsync(passwordAdto), DefaultAuthorisationContext.Create(AuthorisationResource.Authenticate, AuthorisationAction.Create))); }