Merge pull request #881 from rexorient/master
Added CORS preflight support for realms/<realm>/tokens/refresh
This commit is contained in:
commit
7de0c8f78b
1 changed files with 15 additions and 0 deletions
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue