private function _setAttributes()
    {
        if (isset($this->_tokenData['sub'])) {
            $user_data = $this->_tokenData;

            // Remove the values that are part of the JWT and not user attributes.
            unset($user_data['sub']);
            unset($user_data['exp']);
            unset($user_data['nbf']);
            unset($user_data['aud']);
            unset($user_data['iss']);
            unset($user_data['jti']);
            unset($user_data['iat']);

            $this->attributes = $user_data;
            if (array_key_exists('eduPersonEntitlement', $this->attributes)) {
                if (is_array($this->attributes['eduPersonEntitlement'])) {
                    $this->entitlements = $this->attributes['eduPersonEntitlement'];
                } else {
                    $this->entitlements = [$this->attributes['eduPersonEntitlement']];
                }
            } else {
                $this->entitlements = [];
            }
        } else {
            throw new \Exception("No principal found!", 400);
        }
    }
private function _setAttributes()
    {
        if (isset($this->_tokenData['sub'])) {
            $user_data = $this->_tokenData;

            // Remove the values that are part of the JWT and not user attributes.
            unset($user_data['sub']);
            unset($user_data['exp']);
            unset($user_data['nbf']);
            unset($user_data['aud']);
            unset($user_data['iss']);
            unset($user_data['jti']);
            unset($user_data['iat']);

            $this->attributes = $user_data;
            if (array_key_exists('eduPersonEntitlement', $this->attributes)) {
                if (is_array($this->attributes['eduPersonEntitlement'])) {
                    $this->entitlements = $this->attributes['eduPersonEntitlement'];
                } else {
                    $this->entitlements = [$this->attributes['eduPersonEntitlement']];
                }
            } else {
                $this->entitlements = [];
            }
        } else {
            throw new \Exception("No principal found!", 400);
        }
    }
private function _setAttributes ( ) { if ( isset ( $ this -> _tokenData [ 'sub' ] ) ) { $ user_data = $ this -> _tokenData ; // Remove the values that are part of the JWT and not user attributes. unset ( $ user_data [ 'sub' ] ) ; unset ( $ user_data [ 'exp' ] ) ; unset ( $ user_data [ 'nbf' ] ) ; unset ( $ user_data [ 'aud' ] ) ; unset ( $ user_data [ 'iss' ] ) ; unset ( $ user_data [ 'jti' ] ) ; unset ( $ user_data [ 'iat' ] ) ; $ this -> attributes = $ user_data ; if ( array_key_exists ( 'eduPersonEntitlement' , $ this -> attributes ) ) { if ( is_array ( $ this -> attributes [ 'eduPersonEntitlement' ] ) ) { $ this -> entitlements = $ this -> attributes [ 'eduPersonEntitlement' ] ; } else { $ this -> entitlements = [ $ this -> attributes [ 'eduPersonEntitlement' ] ] ; } } else { $ this -> entitlements = [ ] ; } } else { throw new \ Exception ( "No principal found!" , 400 ) ; } }
Set the principal's attributes

@throws \Exception

@return void
Set the principal s attributes