Perform basic authentication.
basicAuth (\u p -> return $ u == "michael" && p == "mypass") "My Realm":: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27
Modulewai-extra-3.1.16Haskell2010
Implements HTTP Basic Authentication.
This module may add digest authentication in the future.
Perform basic authentication.
basicAuth (\u p -> return $ u == "michael" && p == "mypass") "My Realm"Like basicAuth, but also passes a request to the authentication function.
Check if a given username and password is valid.
Basic authentication settings. This value is an instance of
IsString, so the recommended approach to create a value is to
provide a string literal (which will be the realm) and then
overriding individual fields.
"My Realm" { authIsProtected = someFunc } :: AuthSettingsIsString AuthSettingsDefined in wai-extra-3.1.16 · Network.Wai.Middleware.HttpAuthTakes the realm and returns an appropriate 401 response when authentication is not provided.
Determine if access to the requested resource is restricted.
Default: always returns True.
Extract basic authentication data from usually Authorization header value. Returns username and password
Extract bearer authentication data from Authorization header value. Returns bearer token