src/SSOServer.php
public function userInfo()
    {
        try {
            $this->startBrokerSession();

            $username = $this->getSessionData('sso_user');

            if (!$username) {
                $this->fail('User not authenticated. Session ID: ' . $this->getSessionData('id'));
            }

            if (!$user = $this->getUserInfo($username)) {
                $this->fail('User not found.');
            }
        } catch (SSOServerException $e) {
            return $this->returnJson(['error' => $e->getMessage()]);
        }

        return $this->returnUserInfo($user);
    }
public function userInfo()
    {
        try {
            $this->startBrokerSession();

            $username = $this->getSessionData('sso_user');

            if (!$username) {
                $this->fail('User not authenticated. Session ID: ' . $this->getSessionData('id'));
            }

            if (!$user = $this->getUserInfo($username)) {
                $this->fail('User not found.');
            }
        } catch (SSOServerException $e) {
            return $this->returnJson(['error' => $e->getMessage()]);
        }

        return $this->returnUserInfo($user);
    }
public function userInfo ( ) { try { $ this -> startBrokerSession ( ) ; $ username = $ this -> getSessionData ( 'sso_user' ) ; if ( ! $ username ) { $ this -> fail ( 'User not authenticated. Session ID: ' . $ this -> getSessionData ( 'id' ) ) ; } if ( ! $ user = $ this -> getUserInfo ( $ username ) ) { $ this -> fail ( 'User not found.' ) ; } } catch ( SSOServerException $ e ) { return $ this -> returnJson ( [ 'error' => $ e -> getMessage ( ) ] ) ; } return $ this -> returnUserInfo ( $ user ) ; }
Returning user info for the broker.

@return string
Returning user info for the broker .