gws.plugin.auth_method.basic¶
HTTP Basic authentication method.
The client sends the credentials with every request in an
Authorization: Basic ... header. The method decodes the header into
username and password credentials, passes them to the authentication
providers and opens a transient session for the authenticated user. No cookie
is set.
The method is registered as a middleware after auth. If a GET request is
denied with status 403, the response is changed to 401 with a
WWW-Authenticate header, so that browsers show a login dialog.
Example:
auth.methods+ {
type "basic"
realm "My Application"
}
Source code: gws.plugin.auth_method.basic
Package Contents¶
- class gws.plugin.auth_method.basic.Config¶
Bases:
gws.base.auth.method.ConfigHTTP basic authentication.