src/idOS/Auth/UserToken.php
public function getToken() : string {
        if (($this->token === null) || ($this->token->isExpired())) {
            $jwtBuilder = new Builder();
            $jwtBuilder->set('iss', $this->credentialPublicKey);
            $jwtBuilder->set('sub', $this->userName);

            $this->token = $jwtBuilder
                ->sign(new Sha256(), $this->credentialPrivateKey)
                ->getToken();
        }

        return (string) $this->token;
    }
public function getToken() : string {
        if (($this->token === null) || ($this->token->isExpired())) {
            $jwtBuilder = new Builder();
            $jwtBuilder->set('iss', $this->credentialPublicKey);
            $jwtBuilder->set('sub', $this->userName);

            $this->token = $jwtBuilder
                ->sign(new Sha256(), $this->credentialPrivateKey)
                ->getToken();
        }

        return (string) $this->token;
    }
public function getToken ( ) : string { if ( ( $ this -> token === null ) || ( $ this -> token -> isExpired ( ) ) ) { $ jwtBuilder = new Builder ( ) ; $ jwtBuilder -> set ( 'iss' , $ this -> credentialPublicKey ) ; $ jwtBuilder -> set ( 'sub' , $ this -> userName ) ; $ this -> token = $ jwtBuilder -> sign ( new Sha256 ( ) , $ this -> credentialPrivateKey ) -> getToken ( ) ; } return ( string ) $ this -> token ; }
Generates the User Token and returns it.

@return string userToken
Generates the User Token and returns it .