src/main/php/auth/token/TokenAuthenticator.php
private function login(Request $request)
    {
        $user = $this->loginProvider->authenticate($request);
        if (null !== $user) {
            try {
                $token = $user->createToken($this->tokenSalt);
                $this->tokenStore->store($request, $token, $user);
                return $user;
            } catch (\Exception $e) {
                throw new InternalAuthProviderException(
                        'Error while trying to store new token for user: ' . $e->getMessage(),
                        $e
                );
            }
        }

        return null;
    }
private function login(Request $request)
    {
        $user = $this->loginProvider->authenticate($request);
        if (null !== $user) {
            try {
                $token = $user->createToken($this->tokenSalt);
                $this->tokenStore->store($request, $token, $user);
                return $user;
            } catch (\Exception $e) {
                throw new InternalAuthProviderException(
                        'Error while trying to store new token for user: ' . $e->getMessage(),
                        $e
                );
            }
        }

        return null;
    }
private function login ( Request $ request ) { $ user = $ this -> loginProvider -> authenticate ( $ request ) ; if ( null !== $ user ) { try { $ token = $ user -> createToken ( $ this -> tokenSalt ) ; $ this -> tokenStore -> store ( $ request , $ token , $ user ) ; return $ user ; } catch ( \ Exception $ e ) { throw new InternalAuthProviderException ( 'Error while trying to store new token for user: ' . $ e -> getMessage ( ) , $ e ) ; } } return null ; }
performs login when token not found or invalid

@param   \stubbles\webapp\Request $request
@return  \stubbles\webapp\auth\User|null
@throws  \stubbles\webapp\auth\InternalAuthProviderException
performs login when token not found or invalid