[TYPO3-dev] Register/User Login via REST

Johannes Mueller j.f.mueller at gmx.de
Fri Aug 28 00:12:17 CEST 2015


Hi,
I finally found the time to test the REST suggestion by fabien. Worked like
a charm with 7.2
I can access my repos and fe repos just the way I need too. The yaml
approach makes the route handling quite easy. Only PUT and DELETE are
missing, but one can workaround that... But I stumbled upon the
programmatic user registration process and am not sure, if my approach
could work.
Are there any snippets or examples (besides the api) that clarify:
1) The programmatic user creation process?
2) The programmatic user auth/login process?
3) Is FrontendUserRepository->add() all I have to care about for
registration?

The web lacks of examples or I'm to blind to get'em :/

Thanks!

J. M.


2015-08-04 15:32 GMT+02:00 Fabien Udriot <fabien.udriot at typo3.org>:

> Hello,
>
> I would go with [EXT:routing](
> http://typo3.org/extensions/repository/view/routing) + a custom
> Controllers of yours. The extension allows to map whatever route (URL) to a
> Controller according to http methods (GET, POST, ...) , the basics of a
> REST API! Besides, you would need your own controller such as
> FrontendUserApiController and define the logic there. I had the occasion to
> implement something like that for another use case:
>
> * The [routing](
> https://github.com/visol/ext-easyvote_smartvote/blob/master/Configuration/GlobalRoutes.yaml
> ).
> * The [API controller](
> https://github.com/visol/ext-easyvote_smartvote/blob/master/Classes/Controller/CandidateApiController.php
> ).
>
> Regards,
>
> Fabien
>
> ---
> TYPO3 - inspiring people to share!
> Get involved: typo3.org
> On 4 Aug 2015, at 14:25, Johannes Mueller wrote:
>
> > Hi,
> > I try to build an angular frontend with typo3 7 acting as backend
> (RESTful
> > web service) delivering JSON objects and handling user authentication.
> >
> > Are there any recommendations/guidelines regarding integration of typo3
> > register and login flows into a web service in general? In an ideal
> world I
> > could handle the login action in an overwritten user controller via a
> POST
> > action f.e. example.com/user/login
> > POST: {"email": "test at user.local", "pw": "pass"}
> > return a session object including a csrf token, a session id/session name
> > and the user roles and proceed with them. Anything in typo3 world, that
> > makes this approach difficult?
> >
> > The extension model delivery works straight forward, so I don't have any
> > question regarding the data CRUD parts.
> >
> > I found the informations on http://rest.cundd.net and
> > http://de.slideshare.net/Kabarakh1/angular-js-und-typ-doh3 to be my only
> > resources at the moment :/ Do other sources regarding this topic exist?
> > Does anyone has experience regarding my approach?
> >
> > Thanks. J. M.
>



More information about the TYPO3-dev mailing list