class HttpServerRequestAuthentication(object):
Known subclasses: ganeti.server.rapi.RemoteApiHandler
Undocumented
Method |
|
Checks the password for a user. |
Method |
|
Determines whether authentication is required for a request. |
Method |
|
Returns the authentication realm for a request. |
Method |
|
Called before a request is handled. |
Method |
|
Checks the password for basic authentication. |
Constant | AUTH |
Undocumented |
Method | _ |
Checks 'Authorization' header sent by client. |
Method | _ |
Checks credentials sent for basic authentication. |
Constant | _CLEARTEXT |
Undocumented |
Constant | _HA1 |
Undocumented |
ganeti.server.rapi.RemoteApiHandler
Checks the password for a user.
This function MUST be overridden by a subclass.
ganeti.server.rapi.RemoteApiHandler
Determines whether authentication is required for a request.
To enable authentication, override this function in a subclass and return True. AUTH_REALM
must be set.
Parameters | |
req:http.server._HttpServerRequest | HTTP request context |
Returns the authentication realm for a request.
May be overridden by a subclass, which then can return different realms for different paths.
Parameters | |
req:http.server._HttpServerRequest | HTTP request context |
Returns | |
string | Authentication realm |
Called before a request is handled.
Parameters | |
req:http.server._HttpServerRequest | HTTP request context |
Checks the password for basic authentication.
As long as they don't start with an opening brace ("{"), old passwords are supported. A new scheme uses H(A1) from RFC2617, where H is MD5 and A1 consists of the username, the authentication realm and the actual password.
Parameters | |
req:http.server._HttpServerRequest | HTTP request context |
username:string | Username from HTTP headers |
password:string | Password from HTTP headers |
expected:string | Expected password with optional scheme prefix (e.g. from users file) |
Checks 'Authorization' header sent by client.
Parameters | |
req:http.server._HttpServerRequest | HTTP request context |
Returns | |
bool | Whether user is allowed to execute request |
Checks credentials sent for basic authentication.
Parameters | |
req:http.server._HttpServerRequest | HTTP request context |
in | Username and password encoded as Base64 |
Returns | |
bool | Whether user is allowed to execute request |