Package org.jboss.windup.web.services
Class KeycloakAuthenticator
- java.lang.Object
-
- org.jboss.windup.web.services.KeycloakAuthenticator
-
public class KeycloakAuthenticator extends Object
Provides basic authentication functions for verifying tokens.- Author:
- Jesse Sightler
-
-
Field Summary
Fields Modifier and Type Field Description static StringPROPERTY_KEYCLOAK_URLstatic StringTRUST_ALL
-
Constructor Summary
Constructors Constructor Description KeycloakAuthenticator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidvalidateToken(boolean ssl, String serverHost, String token)Authenticate the given keycloak token with the keycloak server.
-
-
-
Field Detail
-
PROPERTY_KEYCLOAK_URL
public static final String PROPERTY_KEYCLOAK_URL
- See Also:
- Constant Field Values
-
TRUST_ALL
public static final String TRUST_ALL
- See Also:
- Constant Field Values
-
-
Method Detail
-
validateToken
public static void validateToken(boolean ssl, String serverHost, String token) throws KeycloakAuthenticationExceptionAuthenticate the given keycloak token with the keycloak server. The host of the current server is included in the request, to cover the case where the keycloak url setting is a relative url.- Parameters:
token-- Throws:
KeycloakAuthenticationException
-
-