Package io.jans.fido2.service.audit
Class LockAuditTokenService
java.lang.Object
io.jans.fido2.service.audit.LockAuditTokenService
Obtains an OAuth2 access token, via the client credentials grant, for posting audit events to
the Lock Server. Mirrors the pattern jans-lock's own
TokenEndpointService uses for the
same grant type against the same shared auth server, rather than introducing a new one.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
LockAuditTokenService
public LockAuditTokenService()
-
-
Method Details
-
getAccessToken
- Returns:
- a cached access token for
LOCK_LOG_WRITE_SCOPEif one is still usable, or a freshly-issued one otherwise, ornullif a token could not be obtained (missing/invalid config, or the token endpoint rejected the request). Never throws — the caller treats anulltoken as a delivery failure.Without this cache, every flush (every
lockAuditFlushInterval, ~20s by default) issued a brand-new token — flagged in review on the PR that introduced this class.
-