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