src/SSOServer.php
protected function validateBrokerSessionId(string $sessionId)
    {
        $matches = null;

        if (!preg_match('/^SSO-(\w*+)-(\w*+)-([a-z0-9]*+)$/', $this->getBrokerSessionId(), $matches)) {
            $this->fail('Invalid session id');
        }

        if ($this->generateSessionId($matches[1], $matches[2]) != $sessionId) {
            $this->fail('Checksum failed: Client IP address may have changed');
        }

        return $matches[1];
    }
protected function validateBrokerSessionId(string $sessionId)
    {
        $matches = null;

        if (!preg_match('/^SSO-(\w*+)-(\w*+)-([a-z0-9]*+)$/', $this->getBrokerSessionId(), $matches)) {
            $this->fail('Invalid session id');
        }

        if ($this->generateSessionId($matches[1], $matches[2]) != $sessionId) {
            $this->fail('Checksum failed: Client IP address may have changed');
        }

        return $matches[1];
    }
protected function validateBrokerSessionId ( string $ sessionId ) { $ matches = null ; if ( ! preg_match ( '/^SSO-(\w*+)-(\w*+)-([a-z0-9]*+)$/' , $ this -> getBrokerSessionId ( ) , $ matches ) ) { $ this -> fail ( 'Invalid session id' ) ; } if ( $ this -> generateSessionId ( $ matches [ 1 ] , $ matches [ 2 ] ) != $ sessionId ) { $ this -> fail ( 'Checksum failed: Client IP address may have changed' ) ; } return $ matches [ 1 ] ; }
Check if broker session is valid.

@param string $sessionId Session id from the broker.

@throws SSOServerException

@return string
Check if broker session is valid .