Package ganeti :: Package rapi :: Package auth :: Class RapiAuthenticator
[hide private]
[frames] | no frames]

Class RapiAuthenticator

source code


Class providing authentication interface for RAPi requests.

Instance Methods [hide private]
str or None
ValidateRequest(self, req, handler_access, realm)
Checks whether it's permitted to execute an rapi request.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

ValidateRequest(self, req, handler_access, realm)

source code 

Checks whether it's permitted to execute an rapi request.

Must be implemented in derived classes.

Parameters:
  • req (http.server._HttpServerRequest) - HTTP request context
  • handler_access (set of strings) - access rights required by the requested resourse
  • realm (string) - Authentication realm
Returns: str or None
the authenticated user name if request execution is permitted and None otherwise