2 class AuthenticationConsumer(object):
4 def prepare_authentication_request(self, request, redirect_to):
5 raise NotImplementedError()
7 def process_authentication_request(self, response):
8 raise NotImplementedError()
10 def get_user_data(self, key):
11 raise NotImplementedError()
14 class ConsumerTemplateContext(object):
16 Class that provides information about a certain authentication provider context in the signin page.
20 mode - one of BIGICON, SMALLICON, FORM
22 human_name - the human readable name of the provider
24 extra_js - some providers require us to load extra javascript on the signin page for them to work,
25 this is the place to add those files in the form of a list
27 extra_css - same as extra_js but for css files
34 show_to_logged_in_user = True
37 def readable_key(cls, key):
40 class InvalidAuthentication(Exception):
41 def __init__(self, message):
42 self.message = message