Package io.hawt.web.auth.oidc
Class OidcConfiguration
java.lang.Object
javax.security.auth.login.Configuration
io.hawt.web.auth.oidc.OidcConfiguration
Configuration of OpenID Connect.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enumNested classes/interfaces inherited from class javax.security.auth.login.Configuration
Configuration.Parameters -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcachePublicKeys(org.jolokia.json.JSONObject config) Cache information coming fromjwks_uriendpointString[]extractRoles(ValidAccessToken parsedToken) Extract roles (and maps them if needed) from Access Token according to current configurationfindPublicKey(String kid) When token arrives, find aPublicKeybased onkidfield from JWT header.com.nimbusds.jose.proc.JWKSecurityContextClass<?>String[]String[]booleanvoidvoidsetRolePrincipalClass(Class<? extends Principal> rolePrincipalClass) Configure roles available for OIDC.toJSON()Serialize to be returned by auth endpoint for client-side HawtIO.Methods inherited from class javax.security.auth.login.Configuration
getConfiguration, getInstance, getInstance, getInstance, getParameters, getProvider, getType, refresh, setConfiguration
-
Field Details
-
LOG
public static final org.slf4j.Logger LOG -
OIDC_JAAS_CONFIGURATION
- See Also:
-
-
Constructor Details
-
OidcConfiguration
- Throws:
IOException
-
-
Method Details
-
getAppConfigurationEntry
- Specified by:
getAppConfigurationEntryin classConfiguration
-
getProviderURL
-
getClientId
-
getResponseMode
-
getScopes
-
getRedirectUri
-
getCodeChallengeMethod
-
getPrompt
-
getRolesPath
-
getRoleClass
-
getRoleMapping
-
findPublicKey
When token arrives, find aPublicKeybased onkidfield from JWT header.- Parameters:
kid-- Returns:
-
toJSON
Serialize to be returned by auth endpoint for client-side HawtIO.- Returns:
-
isEnabled
public boolean isEnabled() -
getJwkContext
public com.nimbusds.jose.proc.JWKSecurityContext getJwkContext() -
refreshPublicKeysIfNeeded
public void refreshPublicKeysIfNeeded() -
cachePublicKeys
public void cachePublicKeys(org.jolokia.json.JSONObject config) Cache information coming fromjwks_uriendpoint- Parameters:
config-
-
setRolePrincipalClass
Configure roles available for OIDC. This is not part of the configuration file, as HawtIO takes the roles fromhawtio.rolesproperty which defaults toadmin,manager,viewer- Parameters:
rolePrincipalClass-
-
extractRoles
Extract roles (and maps them if needed) from Access Token according to current configuration- Parameters:
parsedToken-- Returns:
-