[TYPO3-dev] Register/User Login via REST

Fabien Udriot fabien.udriot at typo3.org
Tue Aug 4 15:32:13 CEST 2015


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.
>
> -- 
> Johannes Müller
> Informatiker (B. Sc.)
> mail: j.f.mueller at gmx.de
> tel: +49 177 557 45 45
> fax: +49 89 552 686 43
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev


More information about the TYPO3-dev mailing list