diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/traccar/api/resource/SessionResource.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/api/resource/SessionResource.java b/src/main/java/org/traccar/api/resource/SessionResource.java index ca9f37667..515d7374a 100644 --- a/src/main/java/org/traccar/api/resource/SessionResource.java +++ b/src/main/java/org/traccar/api/resource/SessionResource.java @@ -169,6 +169,10 @@ public class SessionResource extends BaseResource { @Path("openid/auth") @GET public Response openIdAuth() throws IOException { + if (openIdProvider == null) { + throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND).build()); + } + return Response.seeOther( openIdProvider.createAuthRequest() ).build(); @@ -178,6 +182,10 @@ public class SessionResource extends BaseResource { @Path("openid/callback") @GET public Response requestToken() throws IOException, StorageException { + if (openIdProvider == null) { + throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND).build()); + } + // Get full request URI StringBuilder requestURL = new StringBuilder(request.getRequestURL().toString()); String queryString = request.getQueryString(); |