Class AuthenticationResolver
java.lang.Object
com.kingsrook.qqq.backend.core.model.metadata.authentication.AuthenticationResolver
Utility class for resolving the appropriate authentication provider for
a request based on its scope.
The resolver checks scopes in order of specificity:
- API-specific scope (if context has API metadata)
- Route provider-specific scope (if context has route provider metadata)
- Instance default scope (fallback)
If no provider is found, a QException is thrown with appropriate error message.
-
Method Summary
Modifier and TypeMethodDescriptionstatic QAuthenticationMetaDataresolve(QInstance instance, AuthResolutionContext context) Resolve the authentication provider for the given context.
-
Method Details
-
resolve
public static QAuthenticationMetaData resolve(QInstance instance, AuthResolutionContext context) throws QException Resolve the authentication provider for the given context.Checks scopes in order of specificity:
- API scope (if apiMetaData is present)
- Route provider scope (if routeMetaData is present)
- Instance default scope (fallback)
- Parameters:
instance- The QInstance containing scoped authentication providerscontext- The resolution context with request details- Returns:
- The resolved authentication metadata (never null)
- Throws:
QException- If no authentication provider is found
-