All Downloads are FREE. Search and download functionalities are using the official Maven repository.

uk.co.unclealex.diagnostics.SecureMetricsController.scala Maven / Gradle / Ivy

There is a newer version: 1.2.2
Show newest version
package uk.co.unclealex.diagnostics

import com.kenshoo.play.metrics.MetricsController
import play.api.mvc._

/**
  * A wrapper for a [[MetricsController]] that secures any metrics request.
  */
class SecureMetricsController(metricsController: MetricsController,
                              val bearerToken: String,
                              override val controllerComponents: ControllerComponents)
  extends AbstractController(controllerComponents) with SecurableByBearerToken {

  def metrics: Action[AnyContent] = SecuredByBearerToken(metricsController.metrics)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy