HttpBearerChallenge Class

Parses an HTTP WWW-Authentication Bearer challenge from a server.

Inheritance
builtins.object
HttpBearerChallenge

Constructor

HttpBearerChallenge(request_uri, challenge)

Parameters

Name Description
request_uri
Required
challenge
Required

Methods

get_authorization_server

Returns the URI for the authorization server if present, otherwise empty string.

get_resource

Returns the resource if present, otherwise empty string.

get_scope

Returns the scope if present, otherwise empty string.

get_value
is_bearer_challenge

Tests whether an authentication header is a Bearer challenge. :param authentication_header: the authentication header to test rtype: bool

get_authorization_server

Returns the URI for the authorization server if present, otherwise empty string.

get_authorization_server()

get_resource

Returns the resource if present, otherwise empty string.

get_resource()

get_scope

Returns the scope if present, otherwise empty string.

get_scope()

get_value

get_value(key)

Parameters

Name Description
key
Required

is_bearer_challenge

Tests whether an authentication header is a Bearer challenge. :param authentication_header: the authentication header to test rtype: bool

static is_bearer_challenge(authentication_header)

Parameters

Name Description
authentication_header
Required