class documentation

class Authorization(ImmutableDictMixin, dict):

View In Hierarchy

Represents an Authorization header sent by the client.

This is returned by ~werkzeug.http.parse_authorization_header. It can be useful to create the object manually to pass to the test ~werkzeug.test.Client.

Changed in version 0.5: This object became immutable.
Method __init__ Undocumented
Method to​_header 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​_ex__ Undocumented
Method __setitem__ Undocumented
Method clear Undocumented
Method pop Undocumented
Method popitem Undocumented
Method setdefault Undocumented
Method update Undocumented
Method ​_iter​_hashitems Undocumented
Instance Variable ​_hash​_cache Undocumented
def __init__(self, auth_type, data=None):

Undocumented

def to_header(self):

Convert to a string value for an Authorization header.

New in version 2.0: Added to support passing authorization to the test client.
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.