Project

General

Profile

Actions

Feature #91032

closed

FrontendUserAuthentication via email address

Added by C. Gogolin about 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
felogin
Start date:
2020-04-14
Due date:
% Done:

0%

Estimated time:
PHP Version:
7.3
Tags:
felogin services xclass
Complexity:
medium
Sprint Focus:

Description

EN:

Hello,

i hope to find here the developer who created the system extension "felogin".

Currently I'm also trying to build a frontend user login extension, which allows a login via e-mail address.

If I have understood this correctly, the extension "felogin" does not perform its own authorization logic, but leaves that to the FrontendUserAuthentication. which listens for certain GET/POST attributes. This is very clever.

But unfortunately I can't get in between to exchange the email address for the username in my controller.

A redirect is used to... But who wants to have a password in the URL?

    $uri = $this->uriBuilder
                    ->reset()
                    ->setArguments( [
                    'logintype' => 'login',
                    'user' => $username, 
                    'pass' => $password,
                    pid => $this->getStoragePids(),
                    permalogin => $stayLoggedIn ? 1 : 0
                    ])
                    ->build();
      $this->redirectToURI($uri);

Currently I only see the option to extend the FrontendUserAuthentication#getLoginFormData() method via the Xclass API.

But this is not nice either... is there a better option? Is it easy to say from the controller: Please ask user XY to log in? Or a POST-Redirect ... or or or or ...

Unfortunately the services are well described and so are the controllers. But I haven't found anything, for example how the controllers access the services.

Would be really grateful for the help of the core developers.

Greetings
Clemens

Translated with www.DeepL.com/Translator

DE:
Hallo,

ich hoffe hier den Entwickler zu finden, der die System-Erweiterung "felogin" entwickelt hat.

Aktuell versuche ich auch eine Frontend user login Erweiterung zu bauen, welche ein Login auch via E-Mail-Adresse ermöglicht.

Wenn ich das richtig verstanden hab, führt die Erweiterung "felogin" keine eigene Autorisierungslogik durch, sondern überlässt das der FrontendUserAuthentication. Die auf bestimmte GET/POST-Attribute horcht. Das ist sehr clever.

Aber so komme ich leider nicht dazwischen, um in meinem Controller die E-Mail-Adresse gegen den Nutzername auszutauschen.

Über ein Redirect geht es zwar... Aber wer will ein Passwort schon in der URL haben?

    $uri = $this->uriBuilder
                    ->reset()
                    ->setArguments(                    [
                    'logintype' => 'login',
                    'user' => $username, 
                    'pass' => $password,
                    'pid' => $this->getStoragePids(),
                    'permalogin' => $stayLoggedIn ? 1 : 0
                    ])
                    ->build();
      $this->redirectToURI($uri);

Aktuell sehe ich nur die Option über das Xclass-API die Methode FrontendUserAuthentication#getLoginFormData() erweitern.

Das ist aber auch nicht schön... gibt es da noch eine bessere Option? Kann man vom Controller einfach sagen: Bitte den Nutzer XY bitte einloggen? Oder ein POST-Redirect ... oder oder oder....

Leider sind die Services gut beschrieben und die Controller auch. Aber ich habe nichts gefunden, wie beispielsweise die Controller auf die Dienste zugreifen.

Wäre echt dankbar über die geballte Hilfe von den Kernentwicklern.

Grüße
Clemens

Actions

Also available in: Atom PDF