public function signTokenRequest(TokenRequest $tokenRequest, $privateKey)
    {
        openssl_sign($tokenRequest->getIssuer() . ':' . $tokenRequest->getUsername(), $signature, $privateKey);

        return $tokenRequest->setSignature(base64_encode($signature));
    }
public function signTokenRequest(TokenRequest $tokenRequest, $privateKey)
    {
        openssl_sign($tokenRequest->getIssuer() . ':' . $tokenRequest->getUsername(), $signature, $privateKey);

        return $tokenRequest->setSignature(base64_encode($signature));
    }
public function signTokenRequest ( TokenRequest $ tokenRequest , $ privateKey ) { openssl_sign ( $ tokenRequest -> getIssuer ( ) . ':' . $ tokenRequest -> getUsername ( ) , $ signature , $ privateKey ) ; return $ tokenRequest -> setSignature ( base64_encode ( $ signature ) ) ; }
Sign a request token

@param TokenRequest    $tokenRequest
@param resource|string $privateKey

@return TokenRequest
Sign a request token