Browse Source

Definitively removed the `UMATokensProvider` class since is no more useful to anyone

master
Mauro Mugnaini 8 months ago
parent
commit
0182c41ec0
  1. 4
      src/main/java/org/gcube/portal/oidc/lr62/OIDCUmaUtil.java
  2. 30
      src/main/java/org/gcube/portal/oidc/lr62/UMATokensProvider.java

4
src/main/java/org/gcube/portal/oidc/lr62/OIDCUmaUtil.java

@ -391,10 +391,8 @@ public class OIDCUmaUtil {
}
@SuppressWarnings("deprecation")
public static void provideTokensInThreadlocal(JWTToken umaTokens) {
log.debug("Setting UMA token with jti {} in UMA providers", umaTokens.getJti());
UMATokensProvider.instance.set(JWTTokenUtil.getRawContent(umaTokens));
log.debug("Setting UMA token with jti {} in AccessToken provider", umaTokens.getJti());
AccessTokenProvider.instance.set(JWTTokenUtil.getAccessTokenString(umaTokens));
}

30
src/main/java/org/gcube/portal/oidc/lr62/UMATokensProvider.java

@ -1,30 +0,0 @@
package org.gcube.portal.oidc.lr62;
public class UMATokensProvider {
public static UMATokensProvider instance = new UMATokensProvider();
private static final InheritableThreadLocal<String> threadToken = new InheritableThreadLocal<String>() {
@Override
protected String initialValue() {
return null;
}
};
private UMATokensProvider() {
}
public String get() {
return threadToken.get();
}
public void set(String jwt) {
threadToken.set(jwt);
}
public void reset() {
threadToken.remove();
}
}
Loading…
Cancel
Save