Class AuthResolutionContext

java.lang.Object
com.kingsrook.qqq.backend.core.model.metadata.authentication.AuthResolutionContext

public class AuthResolutionContext extends Object
Context information for resolving the appropriate authentication provider for a request.

This context carries information about the request that can be used to determine which scoped authentication provider should be used. The resolver checks scopes in order of specificity (API/RouteProvider → InstanceDefault).

  • Constructor Details

    • AuthResolutionContext

      public AuthResolutionContext()
      Default constructor
  • Method Details

    • getApiName

      public String getApiName()
      Getter for apiName
      Returns:
      The API name (if this is an API request)
    • setApiName

      public void setApiName(String apiName)
      Setter for apiName
      Parameters:
      apiName - The API name
    • withApiName

      public AuthResolutionContext withApiName(String apiName)
      Fluent setter for apiName
      Parameters:
      apiName - The API name
      Returns:
      This context for method chaining
    • getApiMetaData

      public Object getApiMetaData()
      Getter for apiMetaData

      Note: Returns Object to avoid module dependencies. Cast to ApiInstanceMetaData when used in code that has access to the qqq-middleware-api module.

      Returns:
      The API metadata (if this is an API request, should be ApiInstanceMetaData)
    • setApiMetaData

      public void setApiMetaData(Object apiMetaData)
      Setter for apiMetaData
      Parameters:
      apiMetaData - The API metadata (should be ApiInstanceMetaData)
    • withApiMetaData

      public AuthResolutionContext withApiMetaData(Object apiMetaData)
      Fluent setter for apiMetaData

      Note: Uses reflection to extract name if available.

      Parameters:
      apiMetaData - The API metadata (should be ApiInstanceMetaData)
      Returns:
      This context for method chaining
    • getRouteProviderName

      public String getRouteProviderName()
      Getter for routeProviderName
      Returns:
      The route provider name (if this is a route provider request)
    • setRouteProviderName

      public void setRouteProviderName(String routeProviderName)
      Setter for routeProviderName
      Parameters:
      routeProviderName - The route provider name
    • withRouteProviderName

      public AuthResolutionContext withRouteProviderName(String routeProviderName)
      Fluent setter for routeProviderName
      Parameters:
      routeProviderName - The route provider name
      Returns:
      This context for method chaining
    • getRouteMetaData

      public Object getRouteMetaData()
      Getter for routeMetaData

      Note: Returns Object to avoid module dependencies. Cast to JavalinRouteProviderMetaData when used in code that has access to the qqq-middleware-javalin module.

      Returns:
      The route provider metadata (if this is a route provider request, should be JavalinRouteProviderMetaData)
    • setRouteMetaData

      public void setRouteMetaData(Object routeMetaData)
      Setter for routeMetaData
      Parameters:
      routeMetaData - The route provider metadata (should be JavalinRouteProviderMetaData)
    • withRouteMetaData

      public AuthResolutionContext withRouteMetaData(Object routeMetaData)
      Fluent setter for routeMetaData

      Note: Uses reflection to extract name if available.

      Parameters:
      routeMetaData - The route provider metadata (should be JavalinRouteProviderMetaData)
      Returns:
      This context for method chaining
    • getRequestPath

      public String getRequestPath()
      Getter for requestPath
      Returns:
      The request path (for diagnostics/logging)
    • setRequestPath

      public void setRequestPath(String requestPath)
      Setter for requestPath
      Parameters:
      requestPath - The request path
    • withRequestPath

      public AuthResolutionContext withRequestPath(String requestPath)
      Fluent setter for requestPath
      Parameters:
      requestPath - The request path
      Returns:
      This context for method chaining