io.mosip.kernel.openid.bridge.api.utils.AuthCodeProxyFlowUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kernel-openid-bridge-api Show documentation
Show all versions of kernel-openid-bridge-api Show documentation
Mosip Open-ID-Connect bridge API
package io.mosip.kernel.openid.bridge.api.utils;
import java.util.HashMap;
import java.util.Map;
import com.auth0.jwt.JWT;
import com.auth0.jwt.interfaces.DecodedJWT;
public class AuthCodeProxyFlowUtils {
private AuthCodeProxyFlowUtils() {
}
static Map decodedJWTCache = new HashMap<>();
public static String getissuer(String token) {
DecodedJWT decodedJWT = null;
if(decodedJWTCache.get(token)!=null)
decodedJWT = decodedJWTCache.get(token);
else{
decodedJWT = JWT.decode(token);
decodedJWTCache.put(token, decodedJWT);
}
return decodedJWT.getClaim("iss").asString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy