ironic.api.middleware package

Submodules

Module contents

class ironic.api.middleware.AuthPublicRoutes(app, auth, public_api_routes=None)[source]

Bases: object

A wrapper on authentication middleware.

Does not perform verification of authentication tokens for public routes in the API.

__call__(env, start_response)[source]

Call self as a function.

class ironic.api.middleware.JsonExtensionMiddleware(app)[source]

Bases: object

Simplified processing of .json extension.

Previously Ironic API used the “guess_content_type_from_ext” feature. It was never needed, as we never allowed non-JSON content types anyway. Now that it is removed, this middleware strips .json extension for backward compatibility.

__call__(env, start_response)[source]

Call self as a function.

transform_header(version_string)[source]

Transforms version string to HTTP header format.

class ironic.api.middleware.ParsableErrorMiddleware(app)[source]

Bases: object

Replace error body with something the client can parse.

__call__(environ, start_response)[source]

Call self as a function.