Class AuthScope
java.lang.Object
com.kingsrook.qqq.backend.core.model.metadata.authentication.AuthScope
- Direct Known Subclasses:
AuthScope.Api,AuthScope.InstanceDefault,AuthScope.RouteProvider
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:
instanceDefault()- Instance-wide default authenticationapi(ApiInstanceMetaData)- API-specific authenticationrouteProvider(JavalinRouteProviderMetaData)- Route provider-specific authentication
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAPI-specific authentication scope - applies to requests for a specific API.static classInstance default authentication scope - applies to all requests unless overridden by a more specific scope.static classRoute provider-specific authentication scope - applies to requests handled by a specific route provider (e.g., an SPA). -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPrivate constructor - use factory methods to create instances -
Method Summary
Modifier and TypeMethodDescriptionstatic AuthScope.ApiFactory method to create an API-specific scope.static AuthScope.InstanceDefaultFactory method to create an instance default scope.static AuthScope.RouteProviderrouteProvider(Object routeMetaData) Factory method to create a route provider-specific scope.
-
Constructor Details
-
AuthScope
protected AuthScope()Private constructor - use factory methods to create instances
-
-
Method Details
-
instanceDefault
Factory method to create an instance default scope.- Returns:
- AuthScope representing the instance-wide default authentication
-
api
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
ApiInstanceMetaDatafrom 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
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
JavalinRouteProviderMetaDatafrom 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
-