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
  • coffeecodec's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 1 month ago #194282 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.

Code:
public function init(){
    $this->subscribe('newLoginForm');
}
 
public function newLoginForm(){
    $this->getEvent()->getContent($this)->cleanContent();
}
 
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 1 month ago #194353 by DenisChenu
Yes , you're right.

Not documented, but seems
Code:
$this->getEvent()->setContent('Authdb', '');
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 ...)

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
  • coffeecodec's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 1 month ago - 4 years 1 month ago #194420 by coffeecodec
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 .
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.

Lime-years ahead

Online-surveys for every purse and purpose