Token based authentication plugin

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Post Reply
katcher1
Registered User
Posts: 1
Joined: Thu Dec 13, 2018 9:00 pm

Token based authentication plugin

Post by katcher1 »

Hello,

I am currently attempting to develop a single sign on plugin based on a token validation.

Essentially, an external system provides me with a token which I then query a web servie to return a valid username. I would like to automatically create this valid user in phpbb and allow the new user to post to forums etc.

I am using the most recent PHPBB 3.2.4.

I am implementing the login method with username and password and using the token and database name in its place. I have encountered 2 problems

1. How can i call the login directly passing token and dbname ie:
https://servername/phpbb/ucp.php?mode=l ... d=WHATEVER

2. Also, since I am retrieving the username desired from my reverse authentication call within my plugin, when i return array with

LOGIN_SUCCESS_CREATE_PROFILE, the initial login fails since the token is used in place of the new username. If i try it again, the user was created and it logs me in properly.

Is there some way to overload the username passed to auth.php allowing the user to be logged in?

I have a working version from older code but I had to modify core code and do not want to do that.

Any advice or examples would be appreciated.

Thanks

Eric
Post Reply

Return to “phpBB Custom Coding”