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

JWS(Signing issue) #41

@siva-fstack

Description

@siva-fstack

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions