class Authorization(ImmutableDictMixin, dict): (source)
Represents an ``Authorization`` header sent by the client. This is returned by :func:`~werkzeug.http.parse_authorization_header`. It can be useful to create the object manually to pass to the test :class:`~werkzeug.test.Client`. .. versionchanged:: 0.5 This object became immutable.
Method | __init__ |
Undocumented |
Method | to |
Convert to a string value for an ``Authorization`` header. |
Instance Variable | type |
Undocumented |
Property | cnonce |
If the server sent a qop-header in the ``WWW-Authenticate`` header, the client has to provide this value for HTTP digest auth. See the RFC for more details. |
Property | nc |
The nonce count value transmitted by clients if a qop-header is also transmitted. HTTP digest auth only. |
Property | nonce |
The nonce the server sent for digest auth, sent back by the client. A nonce should be unique for every 401 response for HTTP digest auth. |
Property | opaque |
The opaque header from the server returned unchanged by the client. It is recommended that this string be base64 or hexadecimal data. Digest auth only. |
Property | password |
When the authentication type is basic this is the password transmitted by the client, else `None`. |
Property | qop |
Indicates what "quality of protection" the client has applied to the message for HTTP digest auth. Note that this is a single token, not a quoted list of alternatives as in WWW-Authenticate. |
Property | realm |
This is the server realm sent back for HTTP digest auth. |
Property | response |
A string of 32 hex digits computed as defined in RFC 2617, which proves that the user knows a password. Digest auth only. |
Property | uri |
The URI from Request-URI of the Request-Line; duplicated because proxies are allowed to change the Request-Line in transit. HTTP digest auth only. |
Property | username |
The username transmitted. This is set for both basic and digest auth all the time. |
Inherited from ImmutableDictMixin
:
Class Method | fromkeys |
Undocumented |
Method | __delitem__ |
Undocumented |
Method | __hash__ |
Undocumented |
Method | __reduce |
Undocumented |
Method | __setitem__ |
Undocumented |
Method | clear |
Undocumented |
Method | pop |
Undocumented |
Method | popitem |
Undocumented |
Method | setdefault |
Undocumented |
Method | update |
Undocumented |
Method | _iter |
Undocumented |
Instance Variable | _hash |
Undocumented |
Convert to a string value for an ``Authorization`` header. .. versionadded:: 2.0 Added to support passing authorization to the test client.
If the server sent a qop-header in the ``WWW-Authenticate`` header, the client has to provide this value for HTTP digest auth. See the RFC for more details.
The nonce count value transmitted by clients if a qop-header is also transmitted. HTTP digest auth only.
The nonce the server sent for digest auth, sent back by the client. A nonce should be unique for every 401 response for HTTP digest auth.
The opaque header from the server returned unchanged by the client. It is recommended that this string be base64 or hexadecimal data. Digest auth only.
Indicates what "quality of protection" the client has applied to the message for HTTP digest auth. Note that this is a single token, not a quoted list of alternatives as in WWW-Authenticate.
A string of 32 hex digits computed as defined in RFC 2617, which proves that the user knows a password. Digest auth only.