Avoid NPE for unknown paths under .../.well-known/.
This commit is contained in:
parent
07f99a946d
commit
bcbde3fdf0
1 changed files with 7 additions and 2 deletions
|
@ -259,8 +259,13 @@ public class RealmsResource {
|
|||
|
||||
WellKnownProvider wellKnown = session.getProvider(WellKnownProvider.class, providerName);
|
||||
|
||||
ResponseBuilder responseBuilder = Response.ok(wellKnown.getConfig()).cacheControl(CacheControlUtil.getDefaultCacheControl());
|
||||
return Cors.add(request, responseBuilder).allowedOrigins("*").auth().build();
|
||||
if (wellKnown != null) {
|
||||
ResponseBuilder responseBuilder = Response.ok(wellKnown.getConfig())
|
||||
.cacheControl(CacheControlUtil.getDefaultCacheControl());
|
||||
return Cors.add(request, responseBuilder).allowedOrigins("*").auth().build();
|
||||
}
|
||||
|
||||
throw new NotFoundException();
|
||||
}
|
||||
|
||||
@Path("{realm}/authz")
|
||||
|
|
Loading…
Reference in a new issue