Class KeycloakAccessTokenVerifier
- java.lang.Object
-
- org.activiti.cloud.services.notifications.qraphql.ws.security.KeycloakAccessTokenVerifier
-
public class KeycloakAccessTokenVerifier extends Object
-
-
Constructor Summary
Constructors Constructor Description KeycloakAccessTokenVerifier(KeycloakProperties config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PublicKeygetPublicKey(org.keycloak.jose.jws.JWSHeader jwsHeader)StringgetRealmCertsUrl()StringgetRealmUrl()protected PublicKeyretrievePublicKeyFromCertsEndpoint(String realmCertsUrl, org.keycloak.jose.jws.JWSHeader jwsHeader)org.keycloak.representations.AccessTokenverifyToken(String tokenString)Verifies a token against a keycloak instance
-
-
-
Constructor Detail
-
KeycloakAccessTokenVerifier
public KeycloakAccessTokenVerifier(KeycloakProperties config)
-
-
Method Detail
-
verifyToken
public org.keycloak.representations.AccessToken verifyToken(String tokenString) throws org.keycloak.common.VerificationException
Verifies a token against a keycloak instance- Parameters:
tokenString- the string representation of the jws token- Returns:
- a validated keycloak AccessToken
- Throws:
org.keycloak.common.VerificationException- when the token is not valid
-
getPublicKey
protected PublicKey getPublicKey(org.keycloak.jose.jws.JWSHeader jwsHeader)
-
retrievePublicKeyFromCertsEndpoint
protected PublicKey retrievePublicKeyFromCertsEndpoint(String realmCertsUrl, org.keycloak.jose.jws.JWSHeader jwsHeader)
-
getRealmUrl
public String getRealmUrl()
-
getRealmCertsUrl
public String getRealmCertsUrl()
-
-