1 from consumer import OpenIdAbstractAuthConsumer
2 from forum.authentication.base import ConsumerTemplateContext
4 class GoogleAuthConsumer(OpenIdAbstractAuthConsumer):
5 def get_user_url(self, request):
6 return 'https://www.google.com/accounts/o8/id'
8 class GoogleAuthContext(ConsumerTemplateContext):
13 icon = '/media/images/openid/google.gif'
17 class YahooAuthConsumer(OpenIdAbstractAuthConsumer):
18 def get_user_url(self, request):
19 return 'http://yahoo.com/'
21 class YahooAuthContext(ConsumerTemplateContext):
26 icon = '/media/images/openid/yahoo.gif'
30 class AolAuthConsumer(OpenIdAbstractAuthConsumer):
31 def get_user_url(self, request):
32 uname = request.POST['input_field']
33 return 'http://openid.aol.com/' + uname
35 class AolAuthContext(ConsumerTemplateContext):
38 simple_form_context = {
39 'your_what': 'AOL screen name'
43 icon = '/media/images/openid/aol.gif'
46 class MyOpenIdAuthConsumer(OpenIdAbstractAuthConsumer):
47 def get_user_url(self, request):
48 blog_name = request.POST['input_field']
49 return "http://%s.myopenid.com/" % blog_name
51 class MyOpenIdAuthContext(ConsumerTemplateContext):
54 simple_form_context = {
55 'your_what': 'MyOpenID user name'
58 human_name = 'MyOpenID'
59 icon = '/media/images/openid/myopenid.png'
62 class FlickrAuthConsumer(OpenIdAbstractAuthConsumer):
63 def get_user_url(self, request):
64 blog_name = request.POST['input_field']
65 return "http://flickr.com/%s/" % blog_name
67 class FlickrAuthContext(ConsumerTemplateContext):
70 simple_form_context = {
71 'your_what': 'Flickr user name'
75 icon = '/media/images/openid/flickr.png'
78 class TechnoratiAuthConsumer(OpenIdAbstractAuthConsumer):
79 def get_user_url(self, request):
80 blog_name = request.POST['input_field']
81 return "http://technorati.com/people/technorati/%s/" % blog_name
83 class TechnoratiAuthContext(ConsumerTemplateContext):
86 simple_form_context = {
87 'your_what': 'Technorati user name'
90 human_name = 'Technorati'
91 icon = '/media/images/openid/technorati.png'
94 class WordpressAuthConsumer(OpenIdAbstractAuthConsumer):
95 def get_user_url(self, request):
96 blog_name = request.POST['input_field']
97 return "http://%s.wordpress.com/" % blog_name
99 class WordpressAuthContext(ConsumerTemplateContext):
102 simple_form_context = {
103 'your_what': 'Wordpress blog name'
106 human_name = 'Wordpress'
107 icon = '/media/images/openid/wordpress.png'
110 class BloggerAuthConsumer(OpenIdAbstractAuthConsumer):
111 def get_user_url(self, request):
112 blog_name = request.POST['input_field']
113 return "http://%s.blogspot.com/" % blog_name
115 class BloggerAuthContext(ConsumerTemplateContext):
118 simple_form_context = {
119 'your_what': 'Blogger blog name'
122 human_name = 'Blogger'
123 icon = '/media/images/openid/blogger.png'
126 class LiveJournalAuthConsumer(OpenIdAbstractAuthConsumer):
127 def get_user_url(self, request):
128 blog_name = request.POST['input_field']
129 return "http://%s.livejournal.com/" % blog_name
131 class LiveJournalAuthContext(ConsumerTemplateContext):
134 simple_form_context = {
135 'your_what': 'LiveJournal blog name'
138 human_name = 'LiveJournal'
139 icon = '/media/images/openid/livejournal.png'
142 class ClaimIdAuthConsumer(OpenIdAbstractAuthConsumer):
143 def get_user_url(self, request):
144 blog_name = request.POST['input_field']
145 return "http://claimid.com/%s" % blog_name
147 class ClaimIdAuthContext(ConsumerTemplateContext):
150 simple_form_context = {
151 'your_what': 'ClaimID user name'
154 human_name = 'ClaimID'
155 icon = '/media/images/openid/claimid.png'
157 class VerisignAuthConsumer(OpenIdAbstractAuthConsumer):
158 def get_user_url(self, request):
159 blog_name = request.POST['input_field']
160 return "http://%s.pip.verisignlabs.com/" % blog_name
162 class VerisignAuthContext(ConsumerTemplateContext):
165 simple_form_context = {
166 'your_what': 'Verisign user name'
169 human_name = 'Verisign'
170 icon = '/media/images/openid/verisign.png'
173 class OpenIdUrlAuthConsumer(OpenIdAbstractAuthConsumer):
176 class OpenIdUrlAuthContext(ConsumerTemplateContext):
179 human_name = 'OpenId url'
180 stack_item_template = 'modules/openidauth/openidurl.html'
181 icon = '/media/images/openid/openid-inputicon.gif'