code/libraries/joomlatools/library/http/token/token.php
public function sign($secret)
    {
        $token     = $this->toString();
        $signature = $this->getSignature($secret);

        return sprintf("%s.%s", $token, $this->_toBase64url($signature));
    }
public function sign($secret)
    {
        $token     = $this->toString();
        $signature = $this->getSignature($secret);

        return sprintf("%s.%s", $token, $this->_toBase64url($signature));
    }
public function sign ( $ secret ) { $ token = $ this -> toString ( ) ; $ signature = $ this -> getSignature ( $ secret ) ; return sprintf ( "%s.%s" , $ token , $ this -> _toBase64url ( $ signature ) ) ; }
Sign the token

This method returns the Base64url representation of the JWT token including the Crypto segment.

@param mixed $secret The MAC key or password to be used to compute the HMAC signature bytes.
@return String the Base64url representation of the signed JWT token
Sign the token