[TYPO3-dev] Register/User Login via REST

Johannes Mueller j.f.mueller at gmx.de
Mon Aug 31 15:10:25 CEST 2015


Hi.

The user registration process went through:
$defaultGroup =
$this->frontendUserGroupRepository->findByUid($this->userGroupId);
if ($defaultGroup instanceof
\TYPO3\CMS\Extbase\Domain\Model\FrontendUserGroup) {

$feUser->setUsergroup(GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage'));
  $feUser->addUsergroup($defaultGroup);
}
So I'm able to insert a new user, but still missing code examples for
salted password creation. Any suggestions how to save a password
programmatically so it looks the same in the database as saved by an admin
who entered the user in the backend?
Should I go with SaltedPasswordService?

Thanks for infos.

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.
> >
> > --
> > 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
>
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev
>



-- 
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



More information about the TYPO3-dev mailing list