panko.api.app.
app_factory
(global_config, **local_conf)¶panko.api.app.
build_wsgi_app
(argv=None)¶panko.api.app.
load_app
(conf, appname='panko+keystone')¶panko.api.app.
setup_app
(root, conf)¶panko.api.hooks.
ConfigHook
(conf)¶Bases: pecan.hooks.PecanHook
Attach the configuration object to the request.
That allows controllers to get it.
before
(state)¶Override this method to create a hook that gets called after routing, but before the request gets passed to your controller.
state – The Pecan state
object for the current request.
Middleware to replace the plain text message body of an error response with one formatted so the client can parse it.
Based on pecan.middleware.errordocument
panko.api.middleware.
ParsableErrorMiddleware
(app)¶Bases: object
Replace error body with something the client can parse.
best_match_language
(accept_language)¶Determines best available locale from the Accept-Language header.
the best language match or None if the ‘Accept-Language’ header was not available in the request.
Access Control Lists (ACL’s) control access the API server.
panko.api.rbac.
enforce
(policy_name, request)¶Return the user and project the request should be limited to.
request – HTTP request
policy_name – the policy name to validate authz against.
panko.api.rbac.
get_limited_to
(headers)¶Return the user and project the request should be limited to.
headers – HTTP headers dictionary
A tuple of (user, project), set to None if there’s no limit on one of these.
panko.api.rbac.
get_limited_to_project
(headers)¶Return the project the request should be limited to.
headers – HTTP headers dictionary
A project, or None if there’s no limit on it.
panko.api.rbac.
init
()¶panko.api.rbac.
reset
()¶Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.