client = validateClient(credentials);
List<String> params = formParameters.get("token");
accessToken = CollectionUtils.isEmpty(params) ? null : params.get(0);
} catch (ValidationResponseException e) {
ValidationResponse validationResponse = e.v;
return Response.status(Status.BAD_REQUEST).entity(new ErrorResponse(validationResponse.getValue(), validationResponse.getDescription())).build();
}
AccessToken token = accessTokenRepository.findByTokenAndClient(accessToken, client);
if (token == null) {
LOG.info("Access token {} not found for client '{}'. Will return OK however.", accessToken, client.getClientId());
return Response.ok().build();