wotpy.wot.dictionaries.security

Wrapper classes for security dictionaries defined in the Scripting API.

Classes

APIKeySecuritySchemeDict(*args, **kwargs)

API key authentication security configuration.

AutoSecuritySchemeDict(*args, **kwargs)

An automatic authentication security configuration indicating that the security parameters are going to be negotiated by the underlying protocols at runtime.

BasicSecuritySchemeDict(*args, **kwargs)

Basic authentication security configuration using an unencrypted username and password.

BearerSecuritySchemeDict(*args, **kwargs)

Bearer token authentication security configuration.

ComboSecuritySchemeDict(*args, **kwargs)

A combination of other security schemes.

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.

SecuritySchemeDict(*args, **kwargs)

Contains security related configuration.

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

Bases: 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 = {'@type', 'description', 'descriptions', 'in', 'name', 'proxy', 'scheme'}
required = {'scheme'}
property scheme

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

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

Bases: SecuritySchemeDict

An automatic authentication security configuration indicating that the security parameters are going to be negotiated by the underlying protocols at runtime.

property 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: SecuritySchemeDict

Basic authentication security configuration using an unencrypted username and password.

class Meta

Bases: object

defaults = {'in': 'header'}
fields = {'@type', 'description', 'descriptions', 'in', 'name', 'proxy', 'scheme'}
required = {'scheme'}
property 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: 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 = {'@type', 'alg', 'authorization', 'description', 'descriptions', 'format', 'in', 'name', 'proxy', 'scheme'}
required = {'scheme'}
property scheme

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

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

Bases: SecuritySchemeDict

A combination of other security schemes. Elements of this scheme define various ways in which other named schemes defined in securityDefinitions, including other ComboSecurityScheme definitions, are to be combined to create a new scheme definition.

class Meta

Bases: object

fields = {'@type', 'allOf', 'description', 'descriptions', 'oneOf', 'proxy', 'scheme'}
required = {'scheme'}
property 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: 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 = {'@type', 'description', 'descriptions', 'in', 'name', 'proxy', 'qop', 'scheme'}
required = {'scheme'}
property 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: SecuritySchemeDict

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

property 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: 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 = {'@type', 'authorization', 'description', 'descriptions', 'flow', 'proxy', 'refresh', 'scheme', 'scopes', 'token'}
required = {'scheme'}
property 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: SecuritySchemeDict

Pre-shared key authentication security configuration.

class Meta

Bases: object

fields = {'@type', 'description', 'descriptions', 'identity', 'proxy', 'scheme'}
required = {'scheme'}
property 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: WotBaseDict

Contains security related configuration.

class Meta

Bases: object

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

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