Merge "remove several warnings"
diff --git a/platform/northbound/rest-access/src/main/java/org/eclipse/sensinact/gateway/nthbnd/rest/internal/http/HttpEndpoint.java b/platform/northbound/rest-access/src/main/java/org/eclipse/sensinact/gateway/nthbnd/rest/internal/http/HttpEndpoint.java
index 9cf38d4..05d68e7 100644
--- a/platform/northbound/rest-access/src/main/java/org/eclipse/sensinact/gateway/nthbnd/rest/internal/http/HttpEndpoint.java
+++ b/platform/northbound/rest-access/src/main/java/org/eclipse/sensinact/gateway/nthbnd/rest/internal/http/HttpEndpoint.java
@@ -100,7 +100,7 @@
 
         } catch (InvalidCredentialException e) {
             LOG.error(e.getMessage(), e);
-            response.sendError(403, e.getMessage());
+            response.sendError(401, e.getMessage());
 
         } catch (Exception e) {
         	e.printStackTrace();
diff --git a/platform/northbound/rest-access/src/main/java/org/eclipse/sensinact/gateway/nthbnd/rest/internal/http/HttpRestAccess.java b/platform/northbound/rest-access/src/main/java/org/eclipse/sensinact/gateway/nthbnd/rest/internal/http/HttpRestAccess.java
index 5bf823f..68207c9 100644
--- a/platform/northbound/rest-access/src/main/java/org/eclipse/sensinact/gateway/nthbnd/rest/internal/http/HttpRestAccess.java
+++ b/platform/northbound/rest-access/src/main/java/org/eclipse/sensinact/gateway/nthbnd/rest/internal/http/HttpRestAccess.java
@@ -50,8 +50,12 @@
         if (authentication == null) {
             this.endpoint = request.getMediator().getNorthboundEndpoints().getEndpoint();
             response.setHeader("X-Auth-Token", this.endpoint.getSessionToken());
-        } else if (SessionToken.class.isAssignableFrom(authentication.getClass()))
+        } else if (SessionToken.class.isAssignableFrom(authentication.getClass())) {
             this.endpoint = request.getMediator().getNorthboundEndpoints().getEndpoint((SessionToken) authentication);
+            if(this.endpoint == null) {
+            	throw new InvalidCredentialException("Unrecognised session token");
+            }
+        }
         else 
             throw new InvalidCredentialException("Authentication token was expected");
     }
diff --git a/platform/sensinact-security/sensinact-security-openid-keybuilder/pom.xml b/platform/sensinact-security/sensinact-security-openid-keybuilder/pom.xml
index 9406d89..0f0e084 100644
--- a/platform/sensinact-security/sensinact-security-openid-keybuilder/pom.xml
+++ b/platform/sensinact-security/sensinact-security-openid-keybuilder/pom.xml
@@ -60,7 +60,6 @@
 		<dependency>
 		    <groupId>com.fasterxml.jackson.core</groupId>
 		    <artifactId>jackson-databind</artifactId>
-		    <version>2.10.0</version>
 		</dependency>
 	</dependencies>
 
diff --git a/platform/sensinact-security/sensinact-security-test/pom.xml b/platform/sensinact-security/sensinact-security-test/pom.xml
index e6f8f46..ce63644 100644
--- a/platform/sensinact-security/sensinact-security-test/pom.xml
+++ b/platform/sensinact-security/sensinact-security-test/pom.xml
@@ -67,7 +67,6 @@
 		<dependency>
 		    <groupId>com.fasterxml.jackson.core</groupId>
 		    <artifactId>jackson-databind</artifactId>
-		    <version>2.10.0</version>
 			<scope>test</scope>
 		</dependency>
 		<dependency>