Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/mautic.corals.io/vendor/litesaml/lightsaml/src/Store/Sso/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/mautic.corals.io/vendor/litesaml/lightsaml/src/Store/Sso/SsoStateSessionStore.php
<?php

namespace LightSaml\Store\Sso;

use LightSaml\Error\LightSamlSessionNotFoundException;
use LightSaml\State\Sso\SsoState;
use Symfony\Component\HttpFoundation\Session\SessionInterface;

class SsoStateSessionStore implements SsoStateStoreInterface
{
    /** @var null|SessionInterface */
    protected $session;

    /** @var string */
    protected $key;

    /**
     * @param string $key
     */
    public function __construct(?SessionInterface $session, $key)
    {
        $this->session = $session;
        $this->key = $key;
    }

    /**
     * @return SsoState
     */
    public function get()
    {
        $result = $this->getSession()->get($this->key);
        if (null == $result) {
            $result = new SsoState();
            $this->set($result);
        }

        return $result;
    }

    /**
     * @return void
     */
    public function set(SsoState $ssoState)
    {
        $ssoState->setLocalSessionId($this->getSession()->getId());
        $this->getSession()->set($this->key, $ssoState);
    }

    protected function getSession(): SessionInterface
    {
        if (null !== $this->session) {
            return $this->session;
        }

        throw new LightSamlSessionNotFoundException('Session Not Found');
    }
}

Spamworldpro Mini