refactoring code
This commit is contained in:
parent
bf2f5b55e1
commit
57826ed6ff
|
@ -23,9 +23,10 @@ public class Utils {
|
|||
|
||||
public static JWTToken setToken(URL oidcAddress, String clientId, String secret) throws OpenIdConnectRESTHelperException {
|
||||
JWTToken token=null;
|
||||
String context=ScopeProvider.instance.get();
|
||||
try {
|
||||
logger.trace("setToken method");
|
||||
String context=ScopeProvider.instance.get();
|
||||
|
||||
logger.trace("we are in "+context);
|
||||
if((!Objects.isNull(context)) && (!Objects.isNull(clientId))&& (!Objects.isNull(secret))) {
|
||||
logger.info(clientId+" getting the UMAtoken for context "+context);
|
||||
|
@ -40,6 +41,7 @@ public class Utils {
|
|||
}
|
||||
}catch(Throwable t) {
|
||||
logger.error("Exception: ", t);
|
||||
throw new RuntimeException("Problem with tokens in context"+context+" ", t);
|
||||
}
|
||||
return token;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue