Class IntrospectValidationSensorKeyProducer

java.lang.Object
io.strimzi.kafka.oauth.metrics.AbstractSensorKeyProducer
io.strimzi.kafka.oauth.metrics.IntrospectValidationSensorKeyProducer
All Implemented Interfaces:
SensorKeyProducer

public class IntrospectValidationSensorKeyProducer extends AbstractSensorKeyProducer
A SensorKeyProducer used for token validation metrics for a listener using an introspection endpoint
  • Constructor Details

    • IntrospectValidationSensorKeyProducer

      public IntrospectValidationSensorKeyProducer(String contextId, String saslMechanism, URI uri)
      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 - An introspection endpoint url
  • Method Details

    • successKey

      public SensorKey successKey()
      Generate a SensorKey for metrics about successful token validation requests
      Returns:
      A sensor key
    • errorKey

      public SensorKey errorKey(Throwable e)
      Generate a SensorKey for metrics about failed token validation requests
      Parameters:
      e - The Throwable object to go with the failure
      Returns:
      A sensor key