Merge pull request #881 from rexorient/master

Added CORS preflight support for realms/<realm>/tokens/refresh
This commit is contained in:
Stian Thorgersen 2014-12-03 08:39:29 +01:00
commit 7de0c8f78b

View file

@ -441,6 +441,21 @@ public class OpenIDConnectService {
return Response.ok(token, MediaType.APPLICATION_JSON_TYPE).build();
}
/**
* CORS preflight path for refresh token requests
*
* @return
*/
@Path("refresh")
@OPTIONS
@Produces(MediaType.APPLICATION_JSON)
public Response refreshAccessTokenPreflight() {
if (logger.isDebugEnabled()) {
logger.debugv("cors request from: {0}", request.getHttpHeaders().getRequestHeaders().getFirst("Origin"));
}
return Cors.add(request, Response.ok()).auth().preflight().build();
}
/**
* URL for making refresh token requests.
*