Skip to content

Verifiable Credentials issuance sequence

wowkalucky edited this page Mar 30, 2023 · 1 revision

vc-issuance-sequence

@startuml name "Verifiable Credentials"

title "Full issuance process"

autonumber

actor           Learner as learner
box "Open edX"
participant     "Learner Record MFE" as mfe
participant     "Credentials IDA\n(verifiable_credentials)" as credentials
end box
box "Storage Backends"
participant     "Mobile Wallet" as mobile
participant     "Web Wallet" as web
end box

learner -> mfe : Opens tab \n"Verifiable Credentials"

mfe -> credentials : Fetch Learner's program certificates
mfe <-- credentials : UserCredential data list
rnote over mfe: Program Certificate cards rendering

mfe -> credentials : Fetch avaialable storages
mfe <-- credentials : storages configuration

alt a single storage special case

rnote over mfe: "Create" button rendered
learner -> mfe : Clicks "Create" button

else multiple storage case

rnote over mfe: "Create with..." dropdown rendered
learner -> mfe : Clicks "Create with..." dropdown and\npicks a desired storage/wallet

end

mfe -> credentials : Issiance initialization\n POST "/init/: {credential ID, storage ID}
rnote over credentials: Issuance line created: \n- UserCredential association \n- Storage backend resolved \n- Issuer resolved \n- Data model resolved \n- deeplink generated

alt web wallet

credentials -> web : Redirect to web "deeplink" directly

alt Open edX Wallet (PoC)

rnote over web: Open edX Wallet (PoC) \nhas an interactive step: \n"Issuance request setup"
learner -> web : Changes desired properties
learner -> web : Submits a request

else other web wallets
end

else mobile wallet

mfe <-- credentials : Backend-specific data \n{deeplink, QR code, apps download links}

alt mobile client

rnote over mfe: Displays modal with:\n- deeplink button \n- apps download links \n- additional instructions
rnote over learner : Optionally downloads, \ninstalls mobile application
learner -> mfe : Clicks "Download Credential"

else web client

rnote over mfe: Displays modal with:\n- **QR code** \n- deeplink button \n- apps download links \n- additional instructions
rnote over learner : Optionally downloads, \ninstalls mobile application
learner -> mfe : Scans QR code with mobile application

end

mfe -> mobile : Deeplink initiates mobile openning

end

rnote over mobile,web: Storage process deeplink params \nand composes issuance request
alt web wallet
credentials <- web : Verifiable credential issuance request\n POST "/issue/: {issuance line ID}
else mobile wallet
credentials <- mobile : Verifiable credential issuance request\n POST "/issue/: {issuance line ID}
end

rnote over credentials: Issuance process: \n- request validation \n- issuance line update \n- gathering data \n- credential document composition \n- document signing \n- serialization

alt web wallet
credentials --> web : Verifiable credential returned
else mobile wallet
credentials --> mobile : Verifiable credential returned
end

@enduml