Interface RequestContext

All Superinterfaces:
Context

@DoNotInherit public interface RequestContext extends Context
Not for user extension, can be injected as constructor parameter into HTTP endpoint components or accessible from AbstractHttpEndpoint.requestContext() if the endpoint class extends `AbstractHttpEndpoint`.
  • Method Details

    • getPrincipals

      Principals getPrincipals()
      Get the principals associated with this request.
      Returns:
      The principals associated with this request.
    • getJwtClaims

      JwtClaims getJwtClaims()
      Returns:
      The JWT claims, if any, associated with this request.
    • requestHeader

      Optional<akka.http.javadsl.model.HttpHeader> requestHeader(String headerName)
      Returns:
      A header with the given name (case ignored) if present in the current request, Optional.empty() if not.
    • allRequestHeaders

      List<akka.http.javadsl.model.HttpHeader> allRequestHeaders()
      Returns:
      A list with all the headers of the current request
    • tracing

      Tracing tracing()
      Access to tracing for custom app specific tracing.