Sphereon-Opensource / mobile-wallet

Open-Source Mobile SSI Wallet
Apache License 2.0
58 stars 17 forks source link

post /credentials #183

Open ssi-vc-dev opened 4 months ago

ssi-vc-dev commented 4 months ago

Hello guys. I have a question regarding the POST /credentials request the mobile wallet sends to the agent.

I can see that a request with the following body example is sent

{
    "types": [
        "GuestCredential"
    ],
    "format": "jwt_vc_json",
    "proof": {
        "proof_type": "jwt",
        "jwt":"eyJ0eXAiOiJvcG..."
    }
}

And as a response the agent issues credential. Any hint, where in the code are you generating the jwt (proof.jwt), are you using some library from the sphereon SDK for it?

I appreciate any help you can provide.

flarocca commented 4 months ago

@ssi-vc-dev Hey! Hi! What are you trying to do exactly? JWTs can be generated with any library as long as it supports the algorithm you want to use, Sphereon SDK has some utilities that can help. You could also use @web5/credentials. Eventually you could also use more native libraries such as jose or even jsonwebtoken (altough I am not sure it supports the ones normally used for VCs)

If you are looking for a simple example, check this out. It is a PoC I am working on. Be patient or reach me out if you need help as It is not finished yet (no README at all).

Disclaimer: I am not an Sphereon developer, but I am getting involved as I am diving into this subject!