Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

JWS(Signing issue) #41

Open
siva-fstack opened this issue Apr 7, 2020 · 0 comments
Open

JWS(Signing issue) #41

siva-fstack opened this issue Apr 7, 2020 · 0 comments

Comments

@siva-fstack
Copy link

siva-fstack commented Apr 7, 2020

Hi,

I have tried siging, encryption and decryption using this library. Encryption and decryption working fine, for my case i need to sign first and then needs to be encrypt here i am facing problem in signing, i am not getting any signing result in raw=> . could you help with below code?

//client private key
$client_privateKey = file_get_contents('config/keys/client_private.key');

    $server_publicKey = file_get_contents('config/keys/server_public.key');
    
    $server_privateKey = file_get_contents('config/keys/server_private.key');
    
    $client_publicKey = file_get_contents('config/keys/client_public.key');
    
    $payload = array(
        "IssueTime " => "2020-04-06T09:45:43.567",
        "Issuer " => ORG_ID,
        "Payload" => $post_data
    );
    
    $json_encoded = json_encode($payload);        
    
    
    // JWS/signing
    $jwt = new JOSE_JWT($json_encoded);
    $jws = $jwt->sign($client_privateKey, 'RS256');
    
    echo "Signature client payload<br /><pre>\n";
    print_r($jws);
    echo "</pre>\n";

image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant