BasicAuthenticationMiddleware
class BasicAuthenticationMiddleware (View source)
HTTP Basic Authentication Middleware
This middleware processes HTTP Basic Authentication credentials and authenticates the user
Methods
int
getAuthenticatedUserId(Request $request)
Get authenticated user ID from Basic Auth credentials (stateless)
JsonResponse
handleUnauthenticated()
Handle unauthenticated request by sending a 401 response with WWW-Authenticate header
Details
__construct(PDO $db, ConfigurationManager $config)
Constructor
int
getAuthenticatedUserId(Request $request)
Get authenticated user ID from Basic Auth credentials (stateless)
JsonResponse
handleUnauthenticated()
Handle unauthenticated request by sending a 401 response with WWW-Authenticate header