Ask Your Question

Where should I start on adding new authentication module

asked 2013-03-25 19:29:06 -0500

SocialQA's avatar

I am trying to add new single sign-on authentication to askbot. Where should I start with? For example, lets say I want add something similar to Google can someone provide the setups to fallow?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-03-25 19:41:28 -0500

Evgeny's avatar

updated 2013-03-25 19:50:02 -0500

If you want to add an authentication method to the Askbot it will be necessary to modify the dictionary "data" in the function get_enabled_major_login_providers in file askbot/deps/django_authopenid/

In general, all the authentication code is inside the directory askbot/deps/django_authopenid.

You can also create a plugin and link it via setting ASKBOT_CUSTOM_AUTH_MODEL, but you will have to also read the code to understand how to prepare the plugin as it is not documented at the moment.

If the method you are adding is openid, oauth1 or oauth2 no other changes will be necessary, otherwise you'll have to create the supporting code for the method elsewhere as well - and again you will need to wrap your head around the askbot auth module:).

Alternatively - just use documentation for the Django authentication, disable the askbot auth backend in the settings and replace with your own.

Thirdly, you can add a login backend and modify the template askbot/templates/authopenid/signin.html.

edit flag offensive delete link more


does the existing authentication model have to be disable or can both worlds exist at the same time?

SocialQA's avatar SocialQA  ( 2013-03-25 19:45:08 -0500 )edit

Edited, did not think of the other way at first.

Evgeny's avatar Evgeny  ( 2013-03-25 19:50:28 -0500 )edit

do I need to edit because I start just adding to data dictionary and things break.

SocialQA's avatar SocialQA  ( 2013-03-26 23:17:28 -0500 )edit

I hear you. It is quite normal to have difficulties when you are just getting familiar with a new thing. But I hope you agree that the program did not break by itself:).

Evgeny's avatar Evgeny  ( 2013-03-27 15:33:38 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2013-03-25 19:29:06 -0500

Seen: 471 times

Last updated: Mar 25 '13