Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
website
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gruppo Ask
website
Commits
52c5baa1
Commit
52c5baa1
authored
Jul 02, 2012
by
Giuseppe Terrasi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
disable some auth method
parent
77c468eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
164 additions
and
170 deletions
+164
-170
forum_modules/openidauth/authentication.py
forum_modules/openidauth/authentication.py
+164
-170
No files found.
forum_modules/openidauth/authentication.py
View file @
52c5baa1
...
@@ -12,180 +12,174 @@ class GoogleAuthContext(ConsumerTemplateContext):
...
@@ -12,180 +12,174 @@ class GoogleAuthContext(ConsumerTemplateContext):
human_name
=
'Google'
human_name
=
'Google'
icon
=
'/media/images/openid/google.gif'
icon
=
'/media/images/openid/google.gif'
#class YahooAuthConsumer(OpenIdAbstractAuthConsumer):
# def get_user_url(self, request):
class
YahooAuthConsumer
(
OpenIdAbstractAuthConsumer
):
# return 'http://yahoo.com/'
def
get_user_url
(
self
,
request
):
return
'http://yahoo.com/'
#class YahooAuthContext(ConsumerTemplateContext):
# mode = 'BIGICON'
class
YahooAuthContext
(
ConsumerTemplateContext
):
# type = 'DIRECT'
mode
=
'BIGICON'
# weight = 300
type
=
'DIRECT'
# human_name = 'Yahoo'
weight
=
300
# icon = '/media/images/openid/yahoo.gif'
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
AolAuthConsumer
(
OpenIdAbstractAuthConsumer
):
def
get_user_url
(
self
,
request
):
#class AolAuthContext(ConsumerTemplateContext):
uname
=
request
.
POST
[
'input_field'
]
# mode = 'SMALLICON'
return
'http://openid.aol.com/'
+
uname
# type = 'SIMPLE_FORM'
# simple_form_context = {
class
AolAuthContext
(
ConsumerTemplateContext
):
# 'your_what': 'AOL screen name'
mode
=
'SMALLICON'
# }
type
=
'SIMPLE_FORM'
# weight = 200
simple_form_context
=
{
# human_name = 'AOL'
'your_what'
:
'AOL screen name'
# icon = '/media/images/openid/aol.png'
}
weight
=
200
human_name
=
'AOL'
#class MyOpenIdAuthConsumer(OpenIdAbstractAuthConsumer):
icon
=
'/media/images/openid/aol.png'
# dataype2ax_schema = {
# #'username': ('http://schema.openid.net/namePerson/friendly', 'friendly'),
# 'email': 'http://schema.openid.net/contact/email',
class
MyOpenIdAuthConsumer
(
OpenIdAbstractAuthConsumer
):
# #'web': 'http://schema.openid.net/contact/web/default',
dataype2ax_schema
=
{
# #'birthdate': ('http://schema.openid.net/birthDate', 'birthDate'),
#'username': ('http://schema.openid.net/namePerson/friendly', 'friendly'),
# }
'email'
:
'http://schema.openid.net/contact/email'
,
#'web': 'http://schema.openid.net/contact/web/default',
# def get_user_url(self, request):
#'birthdate': ('http://schema.openid.net/birthDate', 'birthDate'),
# blog_name = request.POST['input_field']
}
# return "http://%s.myopenid.com/" % blog_name
def
get_user_url
(
self
,
request
):
#class MyOpenIdAuthContext(ConsumerTemplateContext):
blog_name
=
request
.
POST
[
'input_field'
]
# mode = 'BIGICON'
return
"http://%s.myopenid.com/"
%
blog_name
# type = 'SIMPLE_FORM'
# simple_form_context = {
class
MyOpenIdAuthContext
(
ConsumerTemplateContext
):
# 'your_what': 'MyOpenID user name'
mode
=
'BIGICON'
# }
type
=
'SIMPLE_FORM'
# weight = 400
simple_form_context
=
{
# human_name = 'MyOpenID'
'your_what'
:
'MyOpenID user name'
# icon = '/media/images/openid/myopenid_big.png'
}
weight
=
400
human_name
=
'MyOpenID'
#class FlickrAuthConsumer(OpenIdAbstractAuthConsumer):
icon
=
'/media/images/openid/myopenid_big.png'
# def get_user_url(self, request):
# blog_name = request.POST['input_field']
# return "http://flickr.com/%s/" % blog_name
class
FlickrAuthConsumer
(
OpenIdAbstractAuthConsumer
):
def
get_user_url
(
self
,
request
):
#class FlickrAuthContext(ConsumerTemplateContext):
blog_name
=
request
.
POST
[
'input_field'
]
# mode = 'SMALLICON'
return
"http://flickr.com/%s/"
%
blog_name
# type = 'SIMPLE_FORM'
# simple_form_context = {
class
FlickrAuthContext
(
ConsumerTemplateContext
):
# 'your_what': 'Flickr user name'
mode
=
'SMALLICON'
# }
type
=
'SIMPLE_FORM'
# weight = 250
simple_form_context
=
{
# human_name = 'Flickr'
'your_what'
:
'Flickr user name'
# icon = '/media/images/openid/flickr.png'
}
weight
=
250
human_name
=
'Flickr'
#class TechnoratiAuthConsumer(OpenIdAbstractAuthConsumer):
icon
=
'/media/images/openid/flickr.png'
# def get_user_url(self, request):
# blog_name = request.POST['input_field']
# return "http://technorati.com/people/technorati/%s/" % blog_name
class
TechnoratiAuthConsumer
(
OpenIdAbstractAuthConsumer
):
def
get_user_url
(
self
,
request
):
#class TechnoratiAuthContext(ConsumerTemplateContext):
blog_name
=
request
.
POST
[
'input_field'
]
# mode = 'SMALLICON'
return
"http://technorati.com/people/technorati/%s/"
%
blog_name
# type = 'SIMPLE_FORM'
# simple_form_context = {
class
TechnoratiAuthContext
(
ConsumerTemplateContext
):
# 'your_what': 'Technorati user name'
mode
=
'SMALLICON'
# }
type
=
'SIMPLE_FORM'
# weight = 260
simple_form_context
=
{
# human_name = 'Technorati'
'your_what'
:
'Technorati user name'
# icon = '/media/images/openid/technorati.png'
}
weight
=
260
# def get_user_url(self, request):
human_name
=
'Technorati'
# blog_name = request.POST['input_field']
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
return
"http://%s.wordpress.com/"
%
blog_name
class
WordpressAuthContext
(
ConsumerTemplateContext
):
#
class WordpressAuthContext(ConsumerTemplateContext):
mode
=
'SMALLICON'
#
mode = 'SMALLICON'
type
=
'SIMPLE_FORM'
#
type = 'SIMPLE_FORM'
simple_form_context
=
{
#
simple_form_context = {
'your_what'
:
'Wordpress blog name'
#
'your_what': 'Wordpress blog name'
}
#
}
weight
=
270
#
weight = 270
human_name
=
'Wordpress'
#
human_name = 'Wordpress'
icon
=
'/media/images/openid/wordpress.png'
#
icon = '/media/images/openid/wordpress.png'
class
BloggerAuthConsumer
(
OpenIdAbstractAuthConsumer
):
#
class BloggerAuthConsumer(OpenIdAbstractAuthConsumer):
def
get_user_url
(
self
,
request
):
#
def get_user_url(self, request):
blog_name
=
request
.
POST
[
'input_field'
]
#
blog_name = request.POST['input_field']
return
"http://%s.blogspot.com/"
%
blog_name
#
return "http://%s.blogspot.com/" % blog_name
class
BloggerAuthContext
(
ConsumerTemplateContext
):
#
class BloggerAuthContext(ConsumerTemplateContext):
mode
=
'SMALLICON'
#
mode = 'SMALLICON'
type
=
'SIMPLE_FORM'
#
type = 'SIMPLE_FORM'
simple_form_context
=
{
#
simple_form_context = {
'your_what'
:
'Blogger blog name'
#
'your_what': 'Blogger blog name'
}
#
}
weight
=
300
#
weight = 300
human_name
=
'Blogger'
#
human_name = 'Blogger'
icon
=
'/media/images/openid/blogger.png'
#
icon = '/media/images/openid/blogger.png'
class
LiveJournalAuthConsumer
(
OpenIdAbstractAuthConsumer
):
#
class LiveJournalAuthConsumer(OpenIdAbstractAuthConsumer):
def
get_user_url
(
self
,
request
):
#
def get_user_url(self, request):
blog_name
=
request
.
POST
[
'input_field'
]
#
blog_name = request.POST['input_field']
return
"http://%s.livejournal.com/"
%
blog_name
#
return "http://%s.livejournal.com/" % blog_name
class
LiveJournalAuthContext
(
ConsumerTemplateContext
):
#
class LiveJournalAuthContext(ConsumerTemplateContext):
mode
=
'SMALLICON'
#
mode = 'SMALLICON'
type
=
'SIMPLE_FORM'
#
type = 'SIMPLE_FORM'
simple_form_context
=
{
#
simple_form_context = {
'your_what'
:
'LiveJournal blog name'
#
'your_what': 'LiveJournal blog name'
}
#
}
weight
=
310
#
weight = 310
human_name
=
'LiveJournal'
#
human_name = 'LiveJournal'
icon
=
'/media/images/openid/livejournal.png'
#
icon = '/media/images/openid/livejournal.png'
class
ClaimIdAuthConsumer
(
OpenIdAbstractAuthConsumer
):
#
class ClaimIdAuthConsumer(OpenIdAbstractAuthConsumer):
def
get_user_url
(
self
,
request
):
#
def get_user_url(self, request):
blog_name
=
request
.
POST
[
'input_field'
]
#
blog_name = request.POST['input_field']
return
"http://claimid.com/%s"
%
blog_name
#
return "http://claimid.com/%s" % blog_name
class
ClaimIdAuthContext
(
ConsumerTemplateContext
):
#
class ClaimIdAuthContext(ConsumerTemplateContext):
mode
=
'SMALLICON'
#
mode = 'SMALLICON'
type
=
'SIMPLE_FORM'
#
type = 'SIMPLE_FORM'
simple_form_context
=
{
#
simple_form_context = {
'your_what'
:
'ClaimID user name'
#
'your_what': 'ClaimID user name'
}
#
}
weight
=
320
#
weight = 320
human_name
=
'ClaimID'
#
human_name = 'ClaimID'
icon
=
'/media/images/openid/claimid.png'
#
icon = '/media/images/openid/claimid.png'
class
VerisignAuthConsumer
(
OpenIdAbstractAuthConsumer
):
#
class VerisignAuthConsumer(OpenIdAbstractAuthConsumer):
def
get_user_url
(
self
,
request
):
#
def get_user_url(self, request):
blog_name
=
request
.
POST
[
'input_field'
]
#
blog_name = request.POST['input_field']
return
"http://%s.pip.verisignlabs.com/"
%
blog_name
#
return "http://%s.pip.verisignlabs.com/" % blog_name
class
VerisignAuthContext
(
ConsumerTemplateContext
):
#
class VerisignAuthContext(ConsumerTemplateContext):
mode
=
'SMALLICON'
#
mode = 'SMALLICON'
type
=
'SIMPLE_FORM'
#
type = 'SIMPLE_FORM'
simple_form_context
=
{
#
simple_form_context = {
'your_what'
:
'Verisign user name'
#
'your_what': 'Verisign user name'
}
#
}
weight
=
340
#
weight = 340
human_name
=
'Verisign'
#
human_name = 'Verisign'
icon
=
'/media/images/openid/verisign.png'
#
icon = '/media/images/openid/verisign.png'
class
OpenIdUrlAuthConsumer
(
OpenIdAbstractAuthConsumer
):
#
class OpenIdUrlAuthConsumer(OpenIdAbstractAuthConsumer):
pass
#
pass
class
OpenIdUrlAuthContext
(
ConsumerTemplateContext
):
#
class OpenIdUrlAuthContext(ConsumerTemplateContext):
mode
=
'STACK_ITEM'
#
mode = 'STACK_ITEM'
weight
=
300
#
weight = 300
human_name
=
'OpenId url'
#
human_name = 'OpenId url'
stack_item_template
=
'modules/openidauth/openidurl.html'
#
stack_item_template = 'modules/openidauth/openidurl.html'
icon
=
'/media/images/openid/openid-inputicon.gif'
#
icon = '/media/images/openid/openid-inputicon.gif'
class
LaunchpadAuthConsumer
(
OpenIdAbstractAuthConsumer
):
class
LaunchpadAuthConsumer
(
OpenIdAbstractAuthConsumer
):
def
get_user_url
(
self
,
request
):
def
get_user_url
(
self
,
request
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment