src/Authenticator/CookieAuthenticator.php
protected function _createToken($identity)
    {
        $plain = $this->_createPlainToken($identity);
        $hash = $this->getPasswordHasher()->hash($plain);

        $usernameField = $this->getConfig('fields.username');

        return json_encode([$identity[$usernameField], $hash]);
    }
protected function _createToken($identity)
    {
        $plain = $this->_createPlainToken($identity);
        $hash = $this->getPasswordHasher()->hash($plain);

        $usernameField = $this->getConfig('fields.username');

        return json_encode([$identity[$usernameField], $hash]);
    }
protected function _createToken ( $ identity ) { $ plain = $ this -> _createPlainToken ( $ identity ) ; $ hash = $ this -> getPasswordHasher ( ) -> hash ( $ plain ) ; $ usernameField = $ this -> getConfig ( 'fields.username' ) ; return json_encode ( [ $ identity [ $ usernameField ] , $ hash ] ) ; }
Creates a full cookie token serialized as a JSON sting.

Cookie token consists of a username and hashed username + password hash.

@param array|\ArrayAccess $identity Identity data.
@return string
Creates a full cookie token serialized as a JSON sting .