Revision 25e7b43f lib/http/auth.py
b/lib/http/auth.py | ||
---|---|---|
125 | 125 |
raise http.HttpUnauthorized(headers=headers) |
126 | 126 |
|
127 | 127 |
def _CheckAuthorization(self, req): |
128 |
"""Checks "Authorization" header sent by client.
|
|
128 |
"""Checks 'Authorization' header sent by client.
|
|
129 | 129 |
|
130 | 130 |
@type req: L{http.server._HttpServerRequest} |
131 | 131 |
@param req: HTTP request context |
132 |
@type credentials: str |
|
133 |
@param credentials: Credentials sent |
|
134 | 132 |
@rtype: bool |
135 | 133 |
@return: Whether user is allowed to execute request |
136 | 134 |
|
... | ... | |
212 | 210 |
def ReadPasswordFile(file_name): |
213 | 211 |
"""Reads a password file. |
214 | 212 |
|
215 |
Lines in the password file are of the following format: |
|
213 |
Lines in the password file are of the following format::
|
|
216 | 214 |
|
217 |
<username> <password> [options] |
|
215 |
<username> <password> [options]
|
|
218 | 216 |
|
219 | 217 |
Fields are separated by whitespace. Username and password are mandatory, |
220 |
options are optional and separated by comma (","). Empty lines and comments
|
|
221 |
("#") are ignored.
|
|
218 |
options are optional and separated by comma (','). Empty lines and comments
|
|
219 |
('#') are ignored.
|
|
222 | 220 |
|
223 | 221 |
@type file_name: str |
224 | 222 |
@param file_name: Path to password file |
Also available in: Unified diff