Class AuthScope

java.lang.Object
com.kingsrook.qqq.backend.core.model.metadata.authentication.AuthScope
Direct Known Subclasses:
AuthScope.Api, AuthScope.InstanceDefault, AuthScope.RouteProvider

public class AuthScope extends Object
Represents a scope for authentication provider registration.

Scopes allow different authentication providers to be registered for different parts of a QQQ application (instance default, specific APIs, or route providers). Scopes use value-based equality, comparing the underlying metadata objects.

Factory methods are provided to create scopes:

  • Constructor Details

    • AuthScope

      protected AuthScope()
      Private constructor - use factory methods to create instances
  • Method Details

    • instanceDefault

      public static AuthScope.InstanceDefault instanceDefault()
      Factory method to create an instance default scope.
      Returns:
      AuthScope representing the instance-wide default authentication
    • api

      public static AuthScope.Api api(Object apiMetaData)
      Factory method to create an API-specific scope.

      Note: The apiMetaData parameter is stored as Object to avoid module dependencies. It should be an instance of ApiInstanceMetaData from the qqq-middleware-api module.

      Parameters:
      apiMetaData - The API metadata this scope is associated with (must not be null, should be ApiInstanceMetaData)
      Returns:
      AuthScope representing API-specific authentication
    • routeProvider

      public static AuthScope.RouteProvider routeProvider(Object routeMetaData)
      Factory method to create a route provider-specific scope.

      Note: The routeMetaData parameter is stored as Object to avoid module dependencies. It should be an instance of JavalinRouteProviderMetaData from the qqq-middleware-javalin module.

      Parameters:
      routeMetaData - The route provider metadata this scope is associated with (must not be null, should be JavalinRouteProviderMetaData)
      Returns:
      AuthScope representing route provider-specific authentication