► |  | Web Server: PLT HTTP Server

1 | Running the Web Server
2 | Writing Servlets
3 | Extending the Web Server
4 | Troubleshooting and Tips
5 | Acknowledgements
| Index

► | 2 | Writing Servlets

2.1 | Defining a Servlet
2.2 | APIs
2.3 | Common Contracts
2.4 | HTTP
2.5 | Web Interaction
2.6 | Stateless Web Interaction
2.7 | Web Cells
2.8 | File Boxes
2.9 | Stateless Web Parameters
2.10 | Formlets
2.11 | Templates
2.12 | Continuation Managers

▼ | 2.4 | HTTP

2.4.1 | Requests
2.4.2 | Bindings
2.4.3 | Responses
2.4.4 | Redirect
2.4.5 | Basic Authentication

On this page:

extract-user-pass

Version: 4.1.4
top← prev up next →

##### 2.4.5`` Basic Authentication

(require web-server/http/basic-auth)

An implementation of HTTP Basic Authentication.

(extract-user-pass heads)
→ (or/c false/c (cons/c bytes? bytes?))
heads : (listof header?)

Returns a pair of the username and password from the authentication header in heads if they are present, or #f.

Example: (extract-user-pass (request-headers/raw req)) might return (cons #"aladin" #"open sesame").

top← prev up next →