Merge branch 'feature/22955' of

https://code-repo.d4science.org/gCubeSystem/common-smartgears.git into
feature/22955

Conflicts:
	src/main/java/org/gcube/smartgears/handlers/application/request/RequestValidator.java
This commit is contained in:
Lucio Lelii 2022-11-11 17:27:30 +01:00
commit 36e56d1e7d
2 changed files with 3 additions and 3 deletions

View File

@ -148,8 +148,8 @@ public class RequestValidator extends RequestHandler {
}catch (KeycloakClientException e) { }catch (KeycloakClientException e) {
RequestError.internal_server_error.fire("error contacting keycloak client", e); RequestError.internal_server_error.fire("error contacting keycloak client", e);
} }
} else if (token!=null) } else if (token!=null && !token.isEmpty())
secret = new GCubeSecret(token); secret = new GCubeSecret(token);
return secret; return secret;
} }

View File

@ -44,7 +44,7 @@ public class DefaultAuthorizationProvider implements AuthorizationProvider {
try { try {
ContextBean scope = new ContextBean(context.replaceAll("%2F", "/")); ContextBean scope = new ContextBean(context.replaceAll("%2F", "/"));
contexts.add(scope.toString()); contexts.add(scope.toString());
LOG.info("found context {}",context); LOG.debug("found context {}",context);
}catch (IllegalArgumentException e) { }catch (IllegalArgumentException e) {
LOG.warn("invalid context found in token: {}", context); LOG.warn("invalid context found in token: {}", context);
} }