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.ico'
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.ico'
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.ico'
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.ico'
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.ico'
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.ico'
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.ico'
157 class VidoopAuthConsumer(OpenIdAbstractAuthConsumer):
158 def get_user_url(self, request):
159 blog_name = request.POST['input_field']
160 return "http://%s.myvidoop.com/" % blog_name
162 class VidoopAuthContext(ConsumerTemplateContext):
165 simple_form_context = {
166 'your_what': 'Vidoop user name'
169 human_name = 'Vidoop'
170 icon = '/media/images/openid/vidoop.ico'
172 class VerisignAuthConsumer(OpenIdAbstractAuthConsumer):
173 def get_user_url(self, request):
174 blog_name = request.POST['input_field']
175 return "http://%s.pip.verisignlabs.com/" % blog_name
177 class VerisignAuthContext(ConsumerTemplateContext):
180 simple_form_context = {
181 'your_what': 'Verisign user name'
184 human_name = 'Verisign'
185 icon = '/media/images/openid/verisign.ico'
188 class OpenIdUrlAuthConsumer(OpenIdAbstractAuthConsumer):
191 class OpenIdUrlAuthContext(ConsumerTemplateContext):
194 human_name = 'OpenId url'
195 stack_item_template = 'modules/openidauth/openidurl.html'
196 icon = '/media/images/openid/openid-inputicon.gif'