Package org.wildfly.security.http.oidc
Class Oidc
- java.lang.Object
-
- org.wildfly.security.http.oidc.Oidc
-
public class Oidc extends Object
Constants and utility methods related to the OpenID Connect HTTP mechanism.- Author:
- Marek Posolda, Farah Juma
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOidc.AuthOutcomestatic classOidc.ClientCredentialsProviderTypestatic classOidc.EnvUtilReplaces any ${} strings with their corresponding system property.static classOidc.SSLRequiredstatic classOidc.TokenStore
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Oidc()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static IntegerasInt(Map<String,Object> cfg, String cfgKey, int defaultValue)private static voidclose(org.apache.http.HttpResponse response)static StringgenerateId()(package private) static intgetCurrentTimeInSeconds()static StringgetJavaAlgorithm(String algorithm)static StringgetJavaAlgorithmForHash(String algorithm)static StringgetQueryParamValue(OidcHttpFacade facade, String paramName)static booleanisOpaqueToken(String token)static voidlogToken(String name, String token)(package private) static <T> TsendJsonHttpRequest(OidcClientConfiguration oidcClientConfiguration, org.apache.http.client.methods.HttpRequestBase httpRequest, Class<T> clazz)protected static StringstripQueryParam(String url, String paramName)
-
-
-
Field Detail
-
OIDC_NAME
public static final String OIDC_NAME
- See Also:
- Constant Field Values
-
JSON_CONTENT_TYPE
public static final String JSON_CONTENT_TYPE
- See Also:
- Constant Field Values
-
HTML_CONTENT_TYPE
public static final String HTML_CONTENT_TYPE
- See Also:
- Constant Field Values
-
WILDCARD_CONTENT_TYPE
public static final String WILDCARD_CONTENT_TYPE
- See Also:
- Constant Field Values
-
TEXT_CONTENT_TYPE
public static final String TEXT_CONTENT_TYPE
- See Also:
- Constant Field Values
-
DISCOVERY_PATH
public static final String DISCOVERY_PATH
- See Also:
- Constant Field Values
-
KEYCLOAK_REALMS_PATH
public static final String KEYCLOAK_REALMS_PATH
- See Also:
- Constant Field Values
-
JSON_CONFIG_CONTEXT_PARAM
public static final String JSON_CONFIG_CONTEXT_PARAM
- See Also:
- Constant Field Values
-
ACCOUNT_PATH
static final String ACCOUNT_PATH
- See Also:
- Constant Field Values
-
CLIENTS_MANAGEMENT_REGISTER_NODE_PATH
public static final String CLIENTS_MANAGEMENT_REGISTER_NODE_PATH
- See Also:
- Constant Field Values
-
CLIENTS_MANAGEMENT_UNREGISTER_NODE_PATH
public static final String CLIENTS_MANAGEMENT_UNREGISTER_NODE_PATH
- See Also:
- Constant Field Values
-
SLASH
public static final String SLASH
- See Also:
- Constant Field Values
-
OIDC_CLIENT_CONTEXT_KEY
public static final String OIDC_CLIENT_CONTEXT_KEY
-
CLIENT_ID
public static final String CLIENT_ID
- See Also:
- Constant Field Values
-
CODE
public static final String CODE
- See Also:
- Constant Field Values
-
ERROR
public static final String ERROR
- See Also:
- Constant Field Values
-
GRANT_TYPE
public static final String GRANT_TYPE
- See Also:
- Constant Field Values
-
LOGIN_HINT
public static final String LOGIN_HINT
- See Also:
- Constant Field Values
-
DOMAIN_HINT
public static final String DOMAIN_HINT
- See Also:
- Constant Field Values
-
MAX_AGE
public static final String MAX_AGE
- See Also:
- Constant Field Values
-
PASSWORD
public static final String PASSWORD
- See Also:
- Constant Field Values
-
PROMPT
public static final String PROMPT
- See Also:
- Constant Field Values
-
SCOPE
public static final String SCOPE
- See Also:
- Constant Field Values
-
UI_LOCALES
public static final String UI_LOCALES
- See Also:
- Constant Field Values
-
USERNAME
public static final String USERNAME
- See Also:
- Constant Field Values
-
OIDC_SCOPE
public static final String OIDC_SCOPE
- See Also:
- Constant Field Values
-
REDIRECT_URI
public static final String REDIRECT_URI
- See Also:
- Constant Field Values
-
REFRESH_TOKEN
public static final String REFRESH_TOKEN
- See Also:
- Constant Field Values
-
RESPONSE_TYPE
public static final String RESPONSE_TYPE
- See Also:
- Constant Field Values
-
SESSION_STATE
public static final String SESSION_STATE
- See Also:
- Constant Field Values
-
STATE
public static final String STATE
- See Also:
- Constant Field Values
-
INVALID_ISSUED_FOR_CLAIM
public static final int INVALID_ISSUED_FOR_CLAIM
- See Also:
- Constant Field Values
-
INVALID_AT_HASH_CLAIM
public static final int INVALID_AT_HASH_CLAIM
- See Also:
- Constant Field Values
-
INVALID_TYPE_CLAIM
public static final int INVALID_TYPE_CLAIM
- See Also:
- Constant Field Values
-
OIDC_CLIENT_CONFIG_RESOLVER
static final String OIDC_CLIENT_CONFIG_RESOLVER
- See Also:
- Constant Field Values
-
OIDC_CONFIG_FILE_LOCATION
static final String OIDC_CONFIG_FILE_LOCATION
- See Also:
- Constant Field Values
-
OIDC_JSON_FILE
static final String OIDC_JSON_FILE
- See Also:
- Constant Field Values
-
AUTHORIZATION
static final String AUTHORIZATION
- See Also:
- Constant Field Values
-
AUTHORIZATION_CODE
static final String AUTHORIZATION_CODE
- See Also:
- Constant Field Values
-
CLIENT_ASSERTION_TYPE
static final String CLIENT_ASSERTION_TYPE
- See Also:
- Constant Field Values
-
CLIENT_ASSERTION
static final String CLIENT_ASSERTION
- See Also:
- Constant Field Values
-
CLIENT_ASSERTION_TYPE_JWT
static final String CLIENT_ASSERTION_TYPE_JWT
- See Also:
- Constant Field Values
-
RS256
static final String RS256
- See Also:
- Constant Field Values
-
RS384
static final String RS384
- See Also:
- Constant Field Values
-
RS512
static final String RS512
- See Also:
- Constant Field Values
-
HS256
static final String HS256
- See Also:
- Constant Field Values
-
HS384
static final String HS384
- See Also:
- Constant Field Values
-
HS512
static final String HS512
- See Also:
- Constant Field Values
-
ES256
static final String ES256
- See Also:
- Constant Field Values
-
ES384
static final String ES384
- See Also:
- Constant Field Values
-
ES512
static final String ES512
- See Also:
- Constant Field Values
-
SHA256
public static final String SHA256
- See Also:
- Constant Field Values
-
SHA384
public static final String SHA384
- See Also:
- Constant Field Values
-
SHA512
public static final String SHA512
- See Also:
- Constant Field Values
-
PROTOCOL_CLASSPATH
static final String PROTOCOL_CLASSPATH
- See Also:
- Constant Field Values
-
OIDC_STATE_COOKIE
static final String OIDC_STATE_COOKIE
- See Also:
- Constant Field Values
-
KEYCLOAK_CLIENT_CLUSTER_HOST
static final String KEYCLOAK_CLIENT_CLUSTER_HOST
- See Also:
- Constant Field Values
-
KEYCLOAK_QUERY_BEARER_TOKEN
static final String KEYCLOAK_QUERY_BEARER_TOKEN
- See Also:
- Constant Field Values
-
DEFAULT_TOKEN_SIGNATURE_ALGORITHM
static final String DEFAULT_TOKEN_SIGNATURE_ALGORITHM
- See Also:
- Constant Field Values
-
KC_IDP_HINT
public static final String KC_IDP_HINT
- See Also:
- Constant Field Values
-
-
Method Detail
-
sendJsonHttpRequest
static <T> T sendJsonHttpRequest(OidcClientConfiguration oidcClientConfiguration, org.apache.http.client.methods.HttpRequestBase httpRequest, Class<T> clazz) throws OidcException
- Throws:
OidcException
-
close
private static void close(org.apache.http.HttpResponse response)
-
generateId
public static String generateId()
-
getCurrentTimeInSeconds
static int getCurrentTimeInSeconds()
-
getQueryParamValue
public static String getQueryParamValue(OidcHttpFacade facade, String paramName)
-
isOpaqueToken
public static boolean isOpaqueToken(String token)
-
-