wotpy.wot.dictionaries.security

Wrapper classes for security dictionaries defined in the Scripting API.

Classes

APIKeySecuritySchemeDict(*args, **kwargs) API key authentication security configuration.
BasicSecuritySchemeDict(*args, **kwargs) Basic authentication security configuration using an unencrypted username and password.
BearerSecuritySchemeDict(*args, **kwargs) Bearer token authentication security configuration.
CertSecuritySchemeDict(*args, **kwargs) Certificate-base asymmetric key security configuration.
DigestSecuritySchemeDict(*args, **kwargs) Digest authentication security configuration.
NoSecuritySchemeDict(*args, **kwargs) A security configuration indicating there is no authentication or other mechanism required to access the resource.
OAuth2SecuritySchemeDict(*args, **kwargs) OAuth2 authentication security configuration.
PSKSecuritySchemeDict(*args, **kwargs) Pre-shared key authentication security configuration.
PoPSecuritySchemeDict(*args, **kwargs) Proof-of-possession token authentication security configuration.
PublicSecuritySchemeDict(*args, **kwargs) Raw public key asymmetric key security configuration.
SecuritySchemeDict(*args, **kwargs) Contains security related configuration.
class wotpy.wot.dictionaries.security.APIKeySecuritySchemeDict(*args, **kwargs)

Bases: wotpy.wot.dictionaries.security.SecuritySchemeDict

API key authentication security configuration. This is for the case where the access token is opaque and is not using a standard token format.

class Meta

Bases: object

defaults = {'in': 'query'}
fields = {'description', 'in', 'name', 'proxy', 'scheme'}
required = {'scheme'}
scheme

The scheme property represents the identification of the security scheme to be used for the Thing.

class wotpy.wot.dictionaries.security.BasicSecuritySchemeDict(*args, **kwargs)

Bases: wotpy.wot.dictionaries.security.SecuritySchemeDict

Basic authentication security configuration using an unencrypted username and password.

class Meta

Bases: object

defaults = {'in': 'header'}
fields = {'description', 'in', 'name', 'proxy', 'scheme'}
required = {'scheme'}
scheme

The scheme property represents the identification of the security scheme to be used for the Thing.

class wotpy.wot.dictionaries.security.BearerSecuritySchemeDict(*args, **kwargs)

Bases: wotpy.wot.dictionaries.security.SecuritySchemeDict

Bearer token authentication security configuration. This scheme is intended for situations where bearer tokens are used independently of OAuth2. If the oauth2 scheme is specified it is not generally necessary to specify this scheme as well as it is implied.

class Meta

Bases: object

defaults = {'alg': 'ES256', 'format': 'jwt', 'in': 'header'}
fields = {'alg', 'authorization', 'description', 'format', 'in', 'name', 'proxy', 'scheme'}
required = {'scheme'}
scheme

The scheme property represents the identification of the security scheme to be used for the Thing.

class wotpy.wot.dictionaries.security.CertSecuritySchemeDict(*args, **kwargs)

Bases: wotpy.wot.dictionaries.security.SecuritySchemeDict

Certificate-base asymmetric key security configuration.

class Meta

Bases: object

fields = {'description', 'identity', 'proxy', 'scheme'}
required = {'scheme'}
scheme

The scheme property represents the identification of the security scheme to be used for the Thing.

class wotpy.wot.dictionaries.security.DigestSecuritySchemeDict(*args, **kwargs)

Bases: wotpy.wot.dictionaries.security.SecuritySchemeDict

Digest authentication security configuration. This scheme is similar to basic authentication but with added features to avoid man-in-the-middle attacks.

class Meta

Bases: object

defaults = {'in': 'header', 'qop': 'auth'}
fields = {'description', 'in', 'name', 'proxy', 'qop', 'scheme'}
required = {'scheme'}
scheme

The scheme property represents the identification of the security scheme to be used for the Thing.

class wotpy.wot.dictionaries.security.NoSecuritySchemeDict(*args, **kwargs)

Bases: wotpy.wot.dictionaries.security.SecuritySchemeDict

A security configuration indicating there is no authentication or other mechanism required to access the resource.

scheme

The scheme property represents the identification of the security scheme to be used for the Thing.

class wotpy.wot.dictionaries.security.OAuth2SecuritySchemeDict(*args, **kwargs)

Bases: wotpy.wot.dictionaries.security.SecuritySchemeDict

OAuth2 authentication security configuration. For the implicit flow the authorization and scopes are required. For the password and client flows both token and scopes are required. For the code flow authorization, token, and scopes are required.

class Meta

Bases: object

defaults = {'flow': 'implicit'}
fields = {'authorization', 'description', 'flow', 'proxy', 'refresh', 'scheme', 'scopes', 'token'}
required = {'scheme'}
scheme

The scheme property represents the identification of the security scheme to be used for the Thing.

class wotpy.wot.dictionaries.security.PSKSecuritySchemeDict(*args, **kwargs)

Bases: wotpy.wot.dictionaries.security.SecuritySchemeDict

Pre-shared key authentication security configuration.

class Meta

Bases: object

fields = {'description', 'identity', 'proxy', 'scheme'}
required = {'scheme'}
scheme

The scheme property represents the identification of the security scheme to be used for the Thing.

class wotpy.wot.dictionaries.security.PoPSecuritySchemeDict(*args, **kwargs)

Bases: wotpy.wot.dictionaries.security.SecuritySchemeDict

Proof-of-possession token authentication security configuration.

class Meta

Bases: object

defaults = {'alg': 'ES256', 'format': 'jwt', 'in': 'header'}
fields = {'alg', 'authorization', 'description', 'format', 'in', 'name', 'proxy', 'scheme'}
required = {'scheme'}
scheme

The scheme property represents the identification of the security scheme to be used for the Thing.

class wotpy.wot.dictionaries.security.PublicSecuritySchemeDict(*args, **kwargs)

Bases: wotpy.wot.dictionaries.security.SecuritySchemeDict

Raw public key asymmetric key security configuration.

class Meta

Bases: object

fields = {'description', 'identity', 'proxy', 'scheme'}
required = {'scheme'}
scheme

The scheme property represents the identification of the security scheme to be used for the Thing.

class wotpy.wot.dictionaries.security.SecuritySchemeDict(*args, **kwargs)

Bases: wotpy.wot.dictionaries.base.WotBaseDict

Contains security related configuration.

class Meta

Bases: object

fields = {'description', 'proxy', 'scheme'}
required = {'scheme'}
classmethod build(*args, **kwargs)

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