src/ResultEncoder/ResultEncoder.php
private function encodeUserSessionResponse(UserSessionResponseInterface $action_result, ServerRequestInterface $request, ResponseInterface $response)
    {
        if ($action_result->getAuthenticatedWith() instanceof  SessionInterface) {
            $response = $this->getCookiesProvider()->set($request, $response, $this->getUserSessionIdCookieName(), $action_result->getAuthenticatedWith()->getSessionId(), [
                'ttl' => 1209600,
                'http_only' => true,
            ])[1];
        }

        return $this->encodeArray($action_result->toArray(), $response);
    }
private function encodeUserSessionResponse(UserSessionResponseInterface $action_result, ServerRequestInterface $request, ResponseInterface $response)
    {
        if ($action_result->getAuthenticatedWith() instanceof  SessionInterface) {
            $response = $this->getCookiesProvider()->set($request, $response, $this->getUserSessionIdCookieName(), $action_result->getAuthenticatedWith()->getSessionId(), [
                'ttl' => 1209600,
                'http_only' => true,
            ])[1];
        }

        return $this->encodeArray($action_result->toArray(), $response);
    }
private function encodeUserSessionResponse ( UserSessionResponseInterface $ action_result , ServerRequestInterface $ request , ResponseInterface $ response ) { if ( $ action_result -> getAuthenticatedWith ( ) instanceof SessionInterface ) { $ response = $ this -> getCookiesProvider ( ) -> set ( $ request , $ response , $ this -> getUserSessionIdCookieName ( ) , $ action_result -> getAuthenticatedWith ( ) -> getSessionId ( ) , [ 'ttl' => 1209600 , 'http_only' => true , ] ) [ 1 ] ; } return $ this -> encodeArray ( $ action_result -> toArray ( ) , $ response ) ; }
Encode user session action results and return properly populated response.

@param  UserSessionResponseInterface $action_result
@param  ServerRequestInterface       $request
@param  ResponseInterface            $response
@return ResponseInterface
Encode user session action results and return properly populated response .