use of com.nike.cerberus.domain.UserCredentials in project cerberus by Nike-Inc.
the class UserAuthenticationController method authenticate.
@RequestMapping(value = "/user", method = GET)
public AuthResponse authenticate(@RequestHeader(value = HttpHeaders.AUTHORIZATION) String authHeader) {
final UserCredentials credentials = extractCredentials(authHeader);
AuthResponse authResponse;
try {
authResponse = authenticationService.authenticate(credentials);
} catch (ApiException e) {
auditLoggingFilterDetails.setAction("Failed to authenticate");
throw e;
}
auditLoggingFilterDetails.setAction("Authenticated");
return authResponse;
}
Aggregations