Class KeycloakAccessTokenVerifier

    • Constructor Detail

      • KeycloakAccessTokenVerifier

        public KeycloakAccessTokenVerifier​(KeycloakProperties config)
    • Method Detail

      • verifyToken

        public GraphQLAccessToken verifyToken​(String tokenString)
                                       throws Exception
        Verifies a token against a keycloak instance
        Specified by:
        verifyToken in interface GraphQLAccessTokenVerifier
        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
        Exception
      • 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()