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

This commit is contained in:
Mauro Mugnaini 2021-06-07 11:42:03 +02:00
parent 664ea7b34c
commit 0182c41ec0
2 changed files with 1 additions and 33 deletions

View File

@ -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));
}

View File

@ -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();
}
}