View source All demos

HTTP Basic requiring SSL

Attempting to access this link will issue a challenge for your user-agent (browser) to provide HTTP Basic credentials. Once authenticated, all the authorization options available in Friend are available to restrict the permissions of particular users.

Please note that Chrome (and maybe other browsers) silently save HTTP Basic credentials for the duration of the session (and resend them automatically!), so logging out won't work as expected.

You can access resources requiring HTTP Basic authentication trivially in any HTTP client (like `curl`) with a URL such as:

curl http://friend:clojure@friend-demo.herokuapp.com/https-basic//requires-authentication

Note that because the handler that requires authentication is further guarded by cemerick.friend/requires-scheme, all requests to it are redirected over HTTPS (even before the HTTP Basic challenge is sent, if required).