Interface OidcObserver
- All Superinterfaces:
JoseObserver, OAuthObserver
Receives caller-thread OIDC events and the inherited OAuth/JOSE endpoint events. Hooks carry no tokens or claims.
Hook failures are contained except for VirtualMachineError; implementations must be thread-safe and fast.
- Since:
- 1.0.0
- Author:
- Mark Allen
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidCalled after successful OIDC validation.default voidCalled after a client successfully builds with an explicit compatibility mode.default voidCalled once after successful build selects the fixed Entra issuer policy.default voiddidFetchUserInfo(@NonNull Boolean signed) Called after the UserInfo subject matches the verified authentication.default voiddidRefreshTokens(@NonNull Boolean idTokenReturned, @NonNull Boolean refreshTokenReturned) Called after refresh tokens are released following all required ID-token checks.default voiddidRejectIdToken(@NonNull OidcValidationException exception) Called when an ID token or OIDC token response fails validation, before token release.default voiddidRejectRefresh(@NonNull OidcValidationException exception) Called when refresh profile/continuity checks reject.default voiddidRejectUserInfo(@NonNull OidcValidationException exception) Called when a UserInfo response fails profile validation.default voidCalled when validation uses the mode, including when its signature or later checks fail.default voidCalled when Entra ID-token validation or an authenticated UserInfo tenant check uses the selected policy, including rejected outcomes.static @NonNull OidcObserverReturns a silent observer.Methods inherited from interface JoseObserver
didAcceptAnyAudience, didFailToFetchJwks, didFailToValidateJwt, didFetchJwks, didSkipJwk, didSuppressJwksFetch, didUseUnpatchedRuntime, didValidateJwt, willFetchJwksModifier and TypeMethodDescriptiondefault voiddidAcceptAnyAudience(@NonNull String issuer) Called when a validator configured to accept any audience is built, and on each of its validations, because accepting any audience lets a token issued for another application through.default voiddidFailToFetchJwks(@NonNull URI jwksUri, @NonNull JwksUnavailableException exception, @NonNull Boolean servingStaleKeys, @NonNull Duration elapsed) Called when a key set fetch failed, by the one caller that fetched it.default voiddidFailToValidateJwt(@NonNull RevetsecException exception, @NonNull Duration elapsed) Called whenJwtValidator.validateResult(String)rejects a token or cannot get its keys, before returning the rejection or propagating the key-source failure.default voiddidFetchJwks(@NonNull URI jwksUri, @NonNull Integer usableKeyCount, @NonNull Integer skippedKeyCount, @NonNull Duration timeToLive, @NonNull Duration elapsed) Called when a key set fetch succeeded, by the one caller that fetched it.default voiddidSkipJwk(@NonNull URI jwksUri, @NonNull Integer keyIndex, @NonNull JwkSkipReason reason) Called for each key a fetched key set holds but Revetsec does not use, on every fetch.default voiddidSuppressJwksFetch(@NonNull URI jwksUri, @NonNull Duration untilNextAttempt) Called on every call that needed a key set fetch but sent no request, because a recent failure, the unknown-key cooldown or the limit on attempts per cooldown held it back.default voiddidUseUnpatchedRuntime(@NonNull String runtimeVersion) Called when a component that acknowledged running below Revetsec's minimum Java runtime version is built, and on each of its fetches.default voiddidValidateJwt(@NonNull JwsAlgorithm algorithm, @NonNull Duration elapsed) Called whenJwtValidator.validateResult(String)accepted a token.default voidwillFetchJwks(@NonNull URI jwksUri) Called just before aRemoteJwksSourcesends a request for its key set, by the one caller that fetches it.Methods inherited from interface OAuthObserver
didBeginAuthorization, didEnableClientAssertionAudience, didFailClientAssertionPreparation, didFailEndpoint, didRejectCallback, didRequestEndpoint, didUseClientAssertionAudience, didUseUnencodedBasic, willRequestEndpointModifier and TypeMethodDescriptiondefault voiddidBeginAuthorization(@NonNull URI endpoint) Called after a browser authorization URL is prepared.default voidCalled once after a client successfully enables endpoint-audience assertion compatibility.default voiddidFailClientAssertionPreparation(@NonNull OAuthEndpoint endpoint, @NonNull OAuthException exception) Called once for assertion preparation failure before any endpoint will event.default voiddidFailEndpoint(@NonNull OAuthEndpoint endpoint, @NonNull URI uri, @NonNull OAuthException exception, @NonNull Duration elapsed) Called when an endpoint request fails.default voiddidRejectCallback(@NonNull OAuthValidationException exception) Called when a callback fails a local validation check.default voiddidRequestEndpoint(@NonNull OAuthEndpoint endpoint, @NonNull URI uri, @NonNull Integer status, @NonNull Duration elapsed) Called after a completed endpoint request.default voidCalled when endpoint-audience compatibility is selected for an actual assertion operation, including failure.default voidCalled when the explicit unencoded Basic interoperability mode is configured and on every request using it.default voidwillRequestEndpoint(@NonNull OAuthEndpoint endpoint, @NonNull URI uri) Called before an OAuth endpoint request.
-
Method Details
-
disabledInstance
Returns a silent observer.- Returns:
- the disabled observer
- Since:
- 1.0.0
-
didEnableCompatibilityMode
Called after a client successfully builds with an explicit compatibility mode.- Parameters:
mode- enabled mode; no credential is passed- Since:
- 1.0.0
-
didUseCompatibilityMode
Called when validation uses the mode, including when its signature or later checks fail.- Parameters:
mode- used mode; no credential or token is passed- Since:
- 1.0.0
-
didRejectIdToken
Called when an ID token or OIDC token response fails validation, before token release.- Parameters:
exception- the same fixed-message exception the caller receives- Since:
- 1.0.0
-
didCompleteAuthentication
Called after successful OIDC validation. No identity or credential is passed.- Since:
- 1.0.0
-
didRejectUserInfo
Called when a UserInfo response fails profile validation. No claims or credentials are passed.- Parameters:
exception- fixed-message rejection- Since:
- 1.0.0
-
didFetchUserInfo
Called after the UserInfo subject matches the verified authentication.- Parameters:
signed- whether a signed response was validated- Since:
- 1.0.0
-
didRejectRefresh
Called when refresh profile/continuity checks reject. No endpoint credential or rejected claim is passed.- Parameters:
exception- fixed-message rejection- Since:
- 1.0.0
-
didRefreshTokens
default void didRefreshTokens(@NonNull Boolean idTokenReturned, @NonNull Boolean refreshTokenReturned) Called after refresh tokens are released following all required ID-token checks.- Parameters:
idTokenReturned- whether a new verified ID token was returnedrefreshTokenReturned- whether the endpoint supplied a replacement refresh token- Since:
- 1.0.0
-
didEnableMicrosoftEntraMultiTenant
Called once after successful build selects the fixed Entra issuer policy.- Since:
- 1.0.0
-
didUseMicrosoftEntraMultiTenant
Called when Entra ID-token validation or an authenticated UserInfo tenant check uses the selected policy, including rejected outcomes. No tenant or credential is supplied.- Since:
- 1.0.0
-