wotpy.protocols.http.credential

Credential classes that add the proper authorization creds to the outgoing requests.

Classes

APIKeySecurityCredential(...)

API Key credential.

AutoSecurityCredential(security_scheme_dict, ...)

Auto security credential.

BaseCredential(security_scheme_dict, ...)

This is the base credential class describing the credential interface.

BasicSecurityCredential(...)

Basic username and password credential.

BearerSecurityCredential(...)

Bearer token credential.

ComboSecurityCredential(...)

Combinator of security schemes credential.

DigestSecurityCredential(...)

Digest credential.

NoSecurityCredential(security_scheme_dict, ...)

Credential that allows all requests.

OAuth2SecurityCredential(...)

OAuth2 credential.

OIDC4VPCredential(security_scheme_dict, ...)

OpenID Connect for Verifiable Presentations credential.

PSKSecurityCredential(security_scheme_dict, ...)

Pre shared key credential.

class wotpy.protocols.http.credential.APIKeySecurityCredential(security_scheme_dict, security_credentials)

Bases: BaseCredential

API Key credential.

async sign(request)

Adds the appropriate authorization header to the request.

class wotpy.protocols.http.credential.AutoSecurityCredential(security_scheme_dict, security_credentials)

Bases: BaseCredential

Auto security credential.

async sign(request)

Adds the appropriate authorization header to the request.

class wotpy.protocols.http.credential.BaseCredential(security_scheme_dict, security_credentials)

Bases: object

This is the base credential class describing the credential interface.

classmethod build(security_scheme_dict, security_credentials)

Builds an instance of the appropriate subclass for the given SecurityScheme.

abstractmethod async sign(request)

Adds the appropriate authorization header to the request.

class wotpy.protocols.http.credential.BasicSecurityCredential(security_scheme_dict, security_credentials)

Bases: BaseCredential

Basic username and password credential.

async sign(request)

Adds the appropriate authorization header to the request.

class wotpy.protocols.http.credential.BearerSecurityCredential(security_scheme_dict, security_credentials)

Bases: BaseCredential

Bearer token credential.

async sign(request)

Adds the appropriate authorization header to the request.

class wotpy.protocols.http.credential.ComboSecurityCredential(security_scheme_dict, security_credentials)

Bases: BaseCredential

Combinator of security schemes credential.

async sign(request)

Adds the appropriate authorization header to the request.

class wotpy.protocols.http.credential.DigestSecurityCredential(security_scheme_dict, security_credentials)

Bases: BaseCredential

Digest credential.

async sign(request)

Adds the appropriate authorization header to the request.

class wotpy.protocols.http.credential.NoSecurityCredential(security_scheme_dict, security_credentials)

Bases: BaseCredential

Credential that allows all requests.

async sign(request)

Adds the appropriate authorization header to the request.

class wotpy.protocols.http.credential.OAuth2SecurityCredential(security_scheme_dict, security_credentials)

Bases: BaseCredential

OAuth2 credential.

async sign(request)

Adds the appropriate authorization header to the request.

class wotpy.protocols.http.credential.OIDC4VPCredential(security_scheme_dict, security_credentials)

Bases: BaseCredential

OpenID Connect for Verifiable Presentations credential.

async static holder_token_request(holder_url, target_url, method, requester)

Function that makes a call to the holder to create a new token that can then be sent along with an HTTP request.

async sign(request)

Adds the appropriate authorization header to the request.

class wotpy.protocols.http.credential.PSKSecurityCredential(security_scheme_dict, security_credentials)

Bases: BaseCredential

Pre shared key credential.

async sign(request)

Adds the appropriate authorization header to the request.