Class OIDCMetadata
java.lang.Object
org.apache.activemq.artemis.spi.core.security.jaas.oidc.OIDCMetadata
Everything we need from
/.well-known/openid-configuration endpoint - including the keys from
the jwks_uri endpoint.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionOIDCMetadata(String expectedIssuer, org.apache.activemq.artemis.json.JsonObject json) OIDCMetadata(String expectedIssuer, org.apache.activemq.artemis.json.JsonObject json, boolean recoverable) -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigureKeys(String json) com.nimbusds.jose.proc.JWKSecurityContextRetrieve current instance ofJWKSecurityContextwith a list ofkeysfor JWT validation.booleanbooleanisValid()booleanshouldFetchAgain(int metadataRetryTime) Whether this metadata should be refreshed because ofmetadataRetryTimein secondsbooleanshouldRefreshPublicKeys(int cacheKeysTime) Valid OIDC metadata containsjwks_uriwhich points to the endpoint from which we can get a "JWK set" = an array of keys in the format specified in RFC 7517 (JSON Web Key (JWK)).withErrorMessage(String message) withException(Exception issue)
-
Field Details
-
LOG
public static final org.slf4j.Logger LOG
-
-
Constructor Details
-
OIDCMetadata
-
OIDCMetadata
public OIDCMetadata(String expectedIssuer, org.apache.activemq.artemis.json.JsonObject json, boolean recoverable)
-
-
Method Details
-
shouldFetchAgain
public boolean shouldFetchAgain(int metadataRetryTime) Whether this metadata should be refreshed because ofmetadataRetryTimein seconds- Parameters:
metadataRetryTime- delay between this metadata should fetched again (in seconds)- Returns:
trueif the metadata should be fetched again
-
shouldRefreshPublicKeys
public boolean shouldRefreshPublicKeys(int cacheKeysTime) Valid OIDC metadata containsjwks_uriwhich points to the endpoint from which we can get a "JWK set" = an array of keys in the format specified in RFC 7517 (JSON Web Key (JWK)). While we don't expect metadata to change (as of 2026-03-11), we're ready to refresh the signature keys sing a configured cache time.- Parameters:
cacheKeysTime- delay between fetching the keys fromjwks_uriendpoint- Returns:
trueif the keys should be fetched again from the provider'sjwks_uriendpoint
-
currentSecurityContext
public com.nimbusds.jose.proc.JWKSecurityContext currentSecurityContext()Retrieve current instance ofJWKSecurityContextwith a list ofkeysfor JWT validation.- Returns:
JWKSecurityContextwith currently known public keys
-
getIssuer
-
getJwksURI
-
configureKeys
-
isValid
public boolean isValid() -
isRecoverable
public boolean isRecoverable() -
withException
-
getException
-
withErrorMessage
-
getErrorMessage
-