Package org.gcube.common.keycloak.model
Class ModelUtils
- java.lang.Object
-
- org.gcube.common.keycloak.model.ModelUtils
-
public class ModelUtils extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.Loggerlogger
-
Constructor Summary
Constructors Constructor Description ModelUtils()
-
Method Summary
-
-
-
Method Detail
-
getAccessTokenPayloadJSONStringFrom
public static String getAccessTokenPayloadJSONStringFrom(TokenResponse tokenResponse) throws Exception
- Throws:
Exception
-
getAccessTokenPayloadJSONStringFrom
public static String getAccessTokenPayloadJSONStringFrom(TokenResponse tokenResponse, boolean prettyPrint) throws Exception
- Throws:
Exception
-
getAccessTokenFrom
public static AccessToken getAccessTokenFrom(TokenResponse tokenResponse) throws Exception
- Throws:
Exception
-
getAccessTokenFrom
public static AccessToken getAccessTokenFrom(String authorizationHeaderOrBase64EncodedJWT) throws Exception
- Throws:
Exception
-
getRefreshTokenPayloadStringFrom
public static String getRefreshTokenPayloadStringFrom(TokenResponse tokenResponse) throws Exception
- Throws:
Exception
-
getRefreshTokenPayloadStringFrom
public static String getRefreshTokenPayloadStringFrom(TokenResponse tokenResponse, boolean prettyPrint) throws Exception
- Throws:
Exception
-
getRefreshTokenFrom
public static RefreshToken getRefreshTokenFrom(TokenResponse tokenResponse) throws Exception
- Throws:
Exception
-
getRefreshTokenFrom
public static RefreshToken getRefreshTokenFrom(String base64EncodedJWT) throws Exception
- Throws:
Exception
-
getBase64Decoded
protected static byte[] getBase64Decoded(String string)
-
getDecodedHeader
public static byte[] getDecodedHeader(String value)
-
getDecodedPayload
public static byte[] getDecodedPayload(String value)
-
getDecodedSignature
public static byte[] getDecodedSignature(String value)
-
getClientIdFromToken
public static String getClientIdFromToken(AccessToken accessToken)
-
-