Authentication

class rest_api_framework.authentication.Authentication[source]

Manage the authentication of a request. Must implement the get_user method

get_user(identifier)[source]

Must return a user if authentication is successfull, None otherwise

class rest_api_framework.authentication.ApiKeyAuthentication(datastore, identifier='apikey')[source]

Authentication based on an apikey stored in a datastore.

get_user(request)[source]

return a user or None based on the identifier found in the request query parameters.

class rest_api_framework.authentication.BasicAuthentication(datastore)[source]

Implement the Basic Auth authentication http://fr.wikipedia.org/wiki/HTTP_Authentification

get_user(request)[source]

return a user or None based on the Authorization: Basic header found in the request. login and password are Base64 encoded string : “login:password”