-from consumer import OpenIdAbstractAuthConsumer\r
-from forum.authentication.base import ConsumerTemplateContext\r
-\r
-class GoogleAuthConsumer(OpenIdAbstractAuthConsumer):\r
- def get_user_url(self, request):\r
- return 'https://www.google.com/accounts/o8/id'\r
-\r
-class GoogleAuthContext(ConsumerTemplateContext):\r
- mode = 'BIGICON'\r
- type = 'DIRECT'\r
- weight = 200\r
- human_name = 'Google'\r
- icon = '/media/images/openid/google.gif'\r
-\r
-\r
-\r
-class YahooAuthConsumer(OpenIdAbstractAuthConsumer):\r
- def get_user_url(self, request):\r
- return 'http://yahoo.com/'\r
-\r
-class YahooAuthContext(ConsumerTemplateContext):\r
- mode = 'BIGICON'\r
- type = 'DIRECT'\r
- weight = 300\r
- human_name = 'Yahoo'\r
- icon = '/media/images/openid/yahoo.gif'\r
-\r
-\r
-\r
-class AolAuthConsumer(OpenIdAbstractAuthConsumer):\r
- def get_user_url(self, request):\r
- uname = request.POST['input_field']\r
- return 'http://openid.aol.com/' + uname\r
-\r
-class AolAuthContext(ConsumerTemplateContext):\r
- mode = 'BIGICON'\r
- type = 'SIMPLE_FORM'\r
- simple_form_context = {\r
- 'your_what': 'AOL screen name'\r
- }\r
- weight = 400\r
- human_name = 'AOL'\r
- icon = '/media/images/openid/aol.gif'\r
-\r
-\r
-class MyOpenIdAuthConsumer(OpenIdAbstractAuthConsumer):\r
- def get_user_url(self, request):\r
- blog_name = request.POST['input_field']\r
- return "http://%s.myopenid.com/" % blog_name\r
-\r
-class MyOpenIdAuthContext(ConsumerTemplateContext):\r
- mode = 'SMALLICON'\r
- type = 'SIMPLE_FORM'\r
- simple_form_context = {\r
- 'your_what': 'MyOpenID user name'\r
- }\r
- weight = 200\r
- human_name = 'MyOpenID'\r
- icon = '/media/images/openid/myopenid.ico'\r
-\r
-\r
-class FlickrAuthConsumer(OpenIdAbstractAuthConsumer):\r
- def get_user_url(self, request):\r
- blog_name = request.POST['input_field']\r
- return "http://flickr.com/%s/" % blog_name\r
-\r
-class FlickrAuthContext(ConsumerTemplateContext):\r
- mode = 'SMALLICON'\r
- type = 'SIMPLE_FORM'\r
- simple_form_context = {\r
- 'your_what': 'Flickr user name'\r
- }\r
- weight = 250\r
- human_name = 'Flickr'\r
- icon = '/media/images/openid/flickr.ico'\r
-\r
-\r
-class TechnoratiAuthConsumer(OpenIdAbstractAuthConsumer):\r
- def get_user_url(self, request):\r
- blog_name = request.POST['input_field']\r
- return "http://technorati.com/people/technorati/%s/" % blog_name\r
-\r
-class TechnoratiAuthContext(ConsumerTemplateContext):\r
- mode = 'SMALLICON'\r
- type = 'SIMPLE_FORM'\r
- simple_form_context = {\r
- 'your_what': 'Technorati user name'\r
- }\r
- weight = 260\r
- human_name = 'Technorati'\r
- icon = '/media/images/openid/technorati.ico'\r
-\r
-\r
-class WordpressAuthConsumer(OpenIdAbstractAuthConsumer):\r
- def get_user_url(self, request):\r
- blog_name = request.POST['input_field']\r
- return "http://%s.wordpress.com/" % blog_name\r
-\r
-class WordpressAuthContext(ConsumerTemplateContext):\r
- mode = 'SMALLICON'\r
- type = 'SIMPLE_FORM'\r
- simple_form_context = {\r
- 'your_what': 'Wordpress blog name'\r
- }\r
- weight = 270\r
- human_name = 'Wordpress'\r
- icon = '/media/images/openid/wordpress.ico'\r
-\r
-\r
-class BloggerAuthConsumer(OpenIdAbstractAuthConsumer):\r
- def get_user_url(self, request):\r
- blog_name = request.POST['input_field']\r
- return "http://%s.blogspot.com/" % blog_name\r
-\r
-class BloggerAuthContext(ConsumerTemplateContext):\r
- mode = 'SMALLICON'\r
- type = 'SIMPLE_FORM'\r
- simple_form_context = {\r
- 'your_what': 'Blogger blog name'\r
- }\r
- weight = 300\r
- human_name = 'Blogger'\r
- icon = '/media/images/openid/blogger.ico'\r
-\r
-\r
-class LiveJournalAuthConsumer(OpenIdAbstractAuthConsumer):\r
- def get_user_url(self, request):\r
- blog_name = request.POST['input_field']\r
- return "http://%s.livejournal.com/" % blog_name\r
-\r
-class LiveJournalAuthContext(ConsumerTemplateContext):\r
- mode = 'SMALLICON'\r
- type = 'SIMPLE_FORM'\r
- simple_form_context = {\r
- 'your_what': 'LiveJournal blog name'\r
- }\r
- weight = 310\r
- human_name = 'LiveJournal'\r
- icon = '/media/images/openid/livejournal.ico'\r
-\r
-\r
-class ClaimIdAuthConsumer(OpenIdAbstractAuthConsumer):\r
- def get_user_url(self, request):\r
- blog_name = request.POST['input_field']\r
- return "http://claimid.com/%s" % blog_name\r
-\r
-class ClaimIdAuthContext(ConsumerTemplateContext):\r
- mode = 'SMALLICON'\r
- type = 'SIMPLE_FORM'\r
- simple_form_context = {\r
- 'your_what': 'ClaimID user name'\r
- }\r
- weight = 320\r
- human_name = 'ClaimID'\r
- icon = '/media/images/openid/claimid.ico'\r
-\r
-class VidoopAuthConsumer(OpenIdAbstractAuthConsumer):\r
- def get_user_url(self, request):\r
- blog_name = request.POST['input_field']\r
- return "http://%s.myvidoop.com/" % blog_name\r
-\r
-class VidoopAuthContext(ConsumerTemplateContext):\r
- mode = 'SMALLICON'\r
- type = 'SIMPLE_FORM'\r
- simple_form_context = {\r
- 'your_what': 'Vidoop user name'\r
- }\r
- weight = 330\r
- human_name = 'Vidoop'\r
- icon = '/media/images/openid/vidoop.ico'\r
-\r
-class VerisignAuthConsumer(OpenIdAbstractAuthConsumer):\r
- def get_user_url(self, request):\r
- blog_name = request.POST['input_field']\r
- return "http://%s.pip.verisignlabs.com/" % blog_name\r
-\r
-class VerisignAuthContext(ConsumerTemplateContext):\r
- mode = 'SMALLICON'\r
- type = 'SIMPLE_FORM'\r
- simple_form_context = {\r
- 'your_what': 'Verisign user name'\r
- }\r
- weight = 340\r
- human_name = 'Verisign'\r
- icon = '/media/images/openid/verisign.ico'\r
-\r
- \r
-class OpenIdUrlAuthConsumer(OpenIdAbstractAuthConsumer):\r
- pass\r
-\r
-class OpenIdUrlAuthContext(ConsumerTemplateContext):\r
- mode = 'STACK_ITEM'\r
- weight = 300\r
- human_name = 'OpenId url'\r
- stack_item_template = 'modules/openidauth/openidurl.html'\r
- icon = '/media/images/openid/openid-inputicon.gif'
\ No newline at end of file
+from consumer import OpenIdAbstractAuthConsumer
+from forum.authentication.base import ConsumerTemplateContext
+
+class GoogleAuthConsumer(OpenIdAbstractAuthConsumer):
+ def get_user_url(self, request):
+ return 'https://www.google.com/accounts/o8/id'
+
+class GoogleAuthContext(ConsumerTemplateContext):
+ mode = 'BIGICON'
+ type = 'DIRECT'
+ weight = 200
+ human_name = 'Google'
+ icon = '/media/images/openid/google.gif'
+
+
+
+class YahooAuthConsumer(OpenIdAbstractAuthConsumer):
+ def get_user_url(self, request):
+ return 'http://yahoo.com/'
+
+class YahooAuthContext(ConsumerTemplateContext):
+ mode = 'BIGICON'
+ type = 'DIRECT'
+ weight = 300
+ human_name = 'Yahoo'
+ icon = '/media/images/openid/yahoo.gif'
+
+
+
+class AolAuthConsumer(OpenIdAbstractAuthConsumer):
+ def get_user_url(self, request):
+ uname = request.POST['input_field']
+ return 'http://openid.aol.com/' + uname
+
+class AolAuthContext(ConsumerTemplateContext):
+ mode = 'BIGICON'
+ type = 'SIMPLE_FORM'
+ simple_form_context = {
+ 'your_what': 'AOL screen name'
+ }
+ weight = 400
+ human_name = 'AOL'
+ icon = '/media/images/openid/aol.gif'
+
+
+class MyOpenIdAuthConsumer(OpenIdAbstractAuthConsumer):
+ dataype2ax_schema = {
+ #'username': ('http://schema.openid.net/namePerson/friendly', 'friendly'),
+ 'email': 'http://schema.openid.net/contact/email',
+ 'web': 'http://schema.openid.net/contact/web/default',
+ 'birthdate': ('http://schema.openid.net/birthDate', 'birthDate'),
+ }
+
+ def get_user_url(self, request):
+ blog_name = request.POST['input_field']
+ return "http://%s.myopenid.com/" % blog_name
+
+class MyOpenIdAuthContext(ConsumerTemplateContext):
+ mode = 'SMALLICON'
+ type = 'SIMPLE_FORM'
+ simple_form_context = {
+ 'your_what': 'MyOpenID user name'
+ }
+ weight = 200
+ human_name = 'MyOpenID'
+ icon = '/media/images/openid/myopenid.png'
+
+
+class FlickrAuthConsumer(OpenIdAbstractAuthConsumer):
+ def get_user_url(self, request):
+ blog_name = request.POST['input_field']
+ return "http://flickr.com/%s/" % blog_name
+
+class FlickrAuthContext(ConsumerTemplateContext):
+ mode = 'SMALLICON'
+ type = 'SIMPLE_FORM'
+ simple_form_context = {
+ 'your_what': 'Flickr user name'
+ }
+ weight = 250
+ human_name = 'Flickr'
+ icon = '/media/images/openid/flickr.png'
+
+
+class TechnoratiAuthConsumer(OpenIdAbstractAuthConsumer):
+ def get_user_url(self, request):
+ blog_name = request.POST['input_field']
+ return "http://technorati.com/people/technorati/%s/" % blog_name
+
+class TechnoratiAuthContext(ConsumerTemplateContext):
+ mode = 'SMALLICON'
+ type = 'SIMPLE_FORM'
+ simple_form_context = {
+ 'your_what': 'Technorati user name'
+ }
+ weight = 260
+ human_name = 'Technorati'
+ icon = '/media/images/openid/technorati.png'
+
+
+class WordpressAuthConsumer(OpenIdAbstractAuthConsumer):
+ def get_user_url(self, request):
+ blog_name = request.POST['input_field']
+ return "http://%s.wordpress.com/" % blog_name
+
+class WordpressAuthContext(ConsumerTemplateContext):
+ mode = 'SMALLICON'
+ type = 'SIMPLE_FORM'
+ simple_form_context = {
+ 'your_what': 'Wordpress blog name'
+ }
+ weight = 270
+ human_name = 'Wordpress'
+ icon = '/media/images/openid/wordpress.png'
+
+
+class BloggerAuthConsumer(OpenIdAbstractAuthConsumer):
+ def get_user_url(self, request):
+ blog_name = request.POST['input_field']
+ return "http://%s.blogspot.com/" % blog_name
+
+class BloggerAuthContext(ConsumerTemplateContext):
+ mode = 'SMALLICON'
+ type = 'SIMPLE_FORM'
+ simple_form_context = {
+ 'your_what': 'Blogger blog name'
+ }
+ weight = 300
+ human_name = 'Blogger'
+ icon = '/media/images/openid/blogger.png'
+
+
+class LiveJournalAuthConsumer(OpenIdAbstractAuthConsumer):
+ def get_user_url(self, request):
+ blog_name = request.POST['input_field']
+ return "http://%s.livejournal.com/" % blog_name
+
+class LiveJournalAuthContext(ConsumerTemplateContext):
+ mode = 'SMALLICON'
+ type = 'SIMPLE_FORM'
+ simple_form_context = {
+ 'your_what': 'LiveJournal blog name'
+ }
+ weight = 310
+ human_name = 'LiveJournal'
+ icon = '/media/images/openid/livejournal.png'
+
+
+class ClaimIdAuthConsumer(OpenIdAbstractAuthConsumer):
+ def get_user_url(self, request):
+ blog_name = request.POST['input_field']
+ return "http://claimid.com/%s" % blog_name
+
+class ClaimIdAuthContext(ConsumerTemplateContext):
+ mode = 'SMALLICON'
+ type = 'SIMPLE_FORM'
+ simple_form_context = {
+ 'your_what': 'ClaimID user name'
+ }
+ weight = 320
+ human_name = 'ClaimID'
+ icon = '/media/images/openid/claimid.png'
+
+class VerisignAuthConsumer(OpenIdAbstractAuthConsumer):
+ def get_user_url(self, request):
+ blog_name = request.POST['input_field']
+ return "http://%s.pip.verisignlabs.com/" % blog_name
+
+class VerisignAuthContext(ConsumerTemplateContext):
+ mode = 'SMALLICON'
+ type = 'SIMPLE_FORM'
+ simple_form_context = {
+ 'your_what': 'Verisign user name'
+ }
+ weight = 340
+ human_name = 'Verisign'
+ icon = '/media/images/openid/verisign.png'
+
+
+class OpenIdUrlAuthConsumer(OpenIdAbstractAuthConsumer):
+ pass
+
+class OpenIdUrlAuthContext(ConsumerTemplateContext):
+ mode = 'STACK_ITEM'
+ weight = 300
+ human_name = 'OpenId url'
+ stack_item_template = 'modules/openidauth/openidurl.html'
+ icon = '/media/images/openid/openid-inputicon.gif'