Interface RouteAuthenticatorInterface
- All Known Implementing Classes:
SimpleRouteAuthenticator
public interface RouteAuthenticatorInterface
Interface for authenticating HTTP requests in Javalin route providers.
Implementations of this interface integrate with QQQ's authentication system
to secure custom Javalin routes. The interface is used by route providers
(ProcessBasedRouter, SimpleFileSystemDirectoryRouter, IsolatedSpaRouteProvider)
to verify that requests are properly authenticated before serving content or
executing processes.
Implementers should:
- Check authentication state via QQQ's session management
- Redirect to login pages for unauthenticated requests
- Return true to allow the request to proceed
- Return false if the request was redirected or should not proceed
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanauthenticateRequest(io.javalin.http.Context context) Authenticate an HTTP request before the route is served.
-
Method Details
-
authenticateRequest
Authenticate an HTTP request before the route is served. This method is called by route providers before serving content or executing processes. Implementations should verify the request's authentication state and handle unauthenticated requests appropriately (typically by redirecting to a login page).- Parameters:
context- the Javalin HTTP context containing request information- Returns:
- true if the request is authenticated and should proceed; false if the request was redirected or should not be processed further
- Throws:
QException- if authentication processing fails
-