- Posts: 4
- Thank you received: 1
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Change the login form with a custom authentication plugin
- coffeecodec
- Topic Author
- Offline
- New Member
Less
More
4 years 1 month ago #194282
by coffeecodec
Change the login form with a custom authentication plugin was created by coffeecodec
Hello there,
I am currently developing an authentication plugin for LimeSurvey using OpenID Connect.
To make it easy for the user to login, I would like to remove the default Username/Password form elements and only leave the "Login"-Button if my authentication plugin is selected.
I tried to edit the form as follows, but when selecting my authentication plugin at the login screen, the default form is still displayed.
Could someone help me with this situation? Maybe I misunderstand the newLoginForm event.
I am currently developing an authentication plugin for LimeSurvey using OpenID Connect.
To make it easy for the user to login, I would like to remove the default Username/Password form elements and only leave the "Login"-Button if my authentication plugin is selected.
I tried to edit the form as follows, but when selecting my authentication plugin at the login screen, the default form is still displayed.
Could someone help me with this situation? Maybe I misunderstand the newLoginForm event.
Code:
public function init(){ $this->subscribe('newLoginForm'); } public function newLoginForm(){ $this->getEvent()->getContent($this)->cleanContent(); }
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
4 years 1 month ago #194353
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Change the login form with a custom authentication plugin
Yes , you're right.
Not documented, but seems
do the tricik.
PS : i'm really happy to get the final plugin. Framasoft already thinking of using LimeSurvey for framaform, but lack of such system (and some other things ...)
Not documented, but seems
Code:
$this->getEvent()->setContent('Authdb', '');
PS : i'm really happy to get the final plugin. Framasoft already thinking of using LimeSurvey for framaform, but lack of such system (and some other things ...)
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- coffeecodec
- Topic Author
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 1
4 years 1 month ago - 4 years 1 month ago #194420
by coffeecodec
Replied by coffeecodec on topic Change the login form with a custom authentication plugin
Hi Denis,
thank you for your advice, it worked out pretty well!
In the end I decided to keep the original Login Form in order to allow admins to use authdb authentication if OpenID Connect doesn't work out.
I am quiet new to the Open Source, Limesurvey and OpenID Connect community :laugh:. So I'm happy to receive feedback on the Plugin and suggestions.
Currently I am able to login through Keycloak, still some topics are open to be done.
The Repository is available on Github .
thank you for your advice, it worked out pretty well!
In the end I decided to keep the original Login Form in order to allow admins to use authdb authentication if OpenID Connect doesn't work out.
I am quiet new to the Open Source, Limesurvey and OpenID Connect community :laugh:. So I'm happy to receive feedback on the Plugin and suggestions.
Currently I am able to login through Keycloak, still some topics are open to be done.
The Repository is available on Github .
Last edit: 4 years 1 month ago by coffeecodec. Reason: Edit Link and grammar.
The following user(s) said Thank You: DenisChenu
The topic has been locked.