Previous topic

The nova.api.metadata.handler Module

Next topic

The nova.api.openstack.common Module

This Page

Psst... hey. You're reading the latest content, but it might be out of sync with code. You can read Nova 2011.2 docs or all OpenStack docs too.

The nova.api.openstack.auth Module

class AuthMiddleware(application, db_driver=None)

Bases: nova.wsgi.Middleware

Authorize the openstack API request or return an HTTP Forbidden.

authenticate(req)
authorize_token(token_hash)

retrieves user information from the datastore given a token

If the token has expired, returns None If the token is not found, returns None Otherwise returns dict(id=(the authorized user’s id))

This method will also remove the token if the timestamp is older than 2 days ago.

get_user_by_authentication(req)
has_authentication(req)
class NoAuthMiddleware(application)

Bases: nova.wsgi.Middleware

Return a fake token if one isn’t specified.