Package io.strimzi.kafka.oauth.metrics
Class JwksValidationSensorKeyProducer
java.lang.Object
io.strimzi.kafka.oauth.metrics.AbstractSensorKeyProducer
io.strimzi.kafka.oauth.metrics.JwksValidationSensorKeyProducer
- All Implemented Interfaces:
SensorKeyProducer
A
SensorKeyProducer used for token validation metrics for a listener using a JWKS endpoint-
Constructor Summary
ConstructorsConstructorDescriptionJwksValidationSensorKeyProducer(String contextId, String saslMechanism, URI uri) Create a new instance -
Method Summary
Modifier and TypeMethodDescriptionGenerate aSensorKeyfor metrics about failed token validation requestsGenerate aSensorKeyfor metrics about successful token validation requests
-
Constructor Details
-
JwksValidationSensorKeyProducer
Create a new instance- Parameters:
contextId- Context id (e.g. a config id or a label)saslMechanism- a mechanism through which the validator is used (e.g. OAUTHBEARER, PLAIN)uri- A jwks endpoint url
-
-
Method Details
-
successKey
Generate aSensorKeyfor metrics about successful token validation requests- Returns:
- A sensor key
-
errorKey
Generate aSensorKeyfor metrics about failed token validation requests- Parameters:
e- The Throwable object to go with the failure- Returns:
- A sensor key
-