public function validate($authTokenPayload) {

    if($authTokenPayload == null) {
      return false;
    }

    $tokenResponse = $this->tokens->find($authTokenPayload);

    if($tokenResponse == null) {
      return false;
    }

    $user = $this->users->retrieveByID( $tokenResponse->getAuthIdentifier() );

    if($user == null) {
      return false;
    }

    return $user;
  }
public function validate($authTokenPayload) {

    if($authTokenPayload == null) {
      return false;
    }

    $tokenResponse = $this->tokens->find($authTokenPayload);

    if($tokenResponse == null) {
      return false;
    }

    $user = $this->users->retrieveByID( $tokenResponse->getAuthIdentifier() );

    if($user == null) {
      return false;
    }

    return $user;
  }
public function validate ( $ authTokenPayload ) { if ( $ authTokenPayload == null ) { return false ; } $ tokenResponse = $ this -> tokens -> find ( $ authTokenPayload ) ; if ( $ tokenResponse == null ) { return false ; } $ user = $ this -> users -> retrieveByID ( $ tokenResponse -> getAuthIdentifier ( ) ) ; if ( $ user == null ) { return false ; } return $ user ; }
Validates a public auth token. Returns User object on success, otherwise false.

@param $authTokenPayload
@return bool|UserInterface
Validates a public auth token . Returns User object on success otherwise false .