connexion.operations.secure

This module defines a SecureOperation class, which implements the security handler for an operation.

Module Contents

Classes

SecureOperation

param security:

list of security rules the application uses by default

Attributes

logger

DEFAULT_MIMETYPE

connexion.operations.secure.logger
connexion.operations.secure.DEFAULT_MIMETYPE = application/json
class connexion.operations.secure.SecureOperation(api, security, security_schemes)
Parameters:
  • security (list) – list of security rules the application uses by default

  • security_definitions (dict) – Security Definitions Object

property api(self)
property security(self)
property security_schemes(self)
property security_decorator(self)

Gets the security decorator for operation

From Swagger Specification:

Security Definitions Object

A declaration of the security schemes available to be used in the specification.

This does not enforce the security schemes on the operations and only serves to provide the relevant details for each scheme.

Operation Object -> security

A declaration of which security schemes are applied for this operation. The list of values describes alternative security schemes that can be used (that is, there is a logical OR between the security requirements). This definition overrides any declared top-level security. To remove a top-level security declaration, an empty array can be used.

Security Requirement Object

Lists the required security schemes to execute this operation. The object can have multiple security schemes declared in it which are all required (that is, there is a logical AND between the schemes).

The name used for each property MUST correspond to a security scheme declared in the Security Definitions.

Return type:

types.FunctionType

get_mimetype(self)