-
Notifications
You must be signed in to change notification settings - Fork 8
Tokens example
Daniel Luque Quintana edited this page May 23, 2020
·
1 revision
Output
---- signJWT ----
The signed JWT is: eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NksifQ.eyJpc3MiOiJqb2UiLCJleHAiOjEzMDA4MTkzODAsImh0dHA6Ly9leGFtcGxlLmNvbS9pc19yb290Ijp0cnVlfQ.TMxNa_VeS67lvnVlMCqEMAaOAmXXoQrvEahDsUzCuy0JXDUxPZ1zv_e1p5u4sqUUL4NuFfKs8mIn0lgFWi1D3w
---- decodeJWT ----
The decoded token is:
{ header: { typ: 'JWT', alg: 'ES256K' },
payload:
{ iss: 'joe',
exp: 1300819380,
'http://example.com/is_root': true },
signature:
'TMxNa_VeS67lvnVlMCqEMAaOAmXXoQrvEahDsUzCuy0JXDUxPZ1zv_e1p5u4sqUUL4NuFfKs8mIn0lgFWi1D3w' }
---- verifyJWT ----
Is the signedJWT verified? true
---- createAlastriaToken ----
The Alastria token is:
{ iss: 'did:ala:quor:redT:3342664027077aea360fa3fc762a17bacbd45698',
gwu: 'https://regular.telsius.blockchainbyeveris.io:2000',
cbu:
'https://serviceprovider.alastria.blockchainbyeveris.io/api/login/',
iat: 1589921166,
ani: 'Alastria network',
nbf: 1563782792,
exp: 1563783392,
jti: 'ze298y42sba' }
---- createAlastriaSesion ----
The Alastria session is:
{ '@context': 'https://w3id.org/did/v1',
iss: 'did:ala:quor:redT:3342664027077aea360fa3fc762a17bacbd45698',
pku:
'0x0ce5edc204ae977d6d69fcc6b339a57b544ef4d094929f3eb918a77dfba26998e77ec5b29a379dd59bbe962e2b22745143aa2b52c4a875b7492c137eeebf4055',
iat: 1589921166,
exp: 1563783392,
nbf: 1563782792,
data:
'eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NksifQ.eyJpc3MiOiJkaWQ6YWxhOnF1b3I6cmVkVDozMzQyNjY0MDI3MDc3YWVhMzYwZmEzZmM3NjJhMTdiYWNiZDQ1Njk4IiwiZ3d1IjoiaHR0cHM6Ly9yZWd1bGFyLnRlbHNpdXMuYmxvY2tjaGFpbmJ5ZXZlcmlzLmlvOjIwMDAiLCJjYnUiOiJodHRwczovL3NlcnZpY2Vwcm92aWRlci5hbGFzdHJpYS5ibG9ja2NoYWluYnlldmVyaXMuaW8vYXBpL2xvZ2luLyIsImlhdCI6MTU4OTkyMTE2NiwiYW5pIjoiQWxhc3RyaWEgbmV0d29yayIsIm5iZiI6MTU2Mzc4Mjc5MiwiZXhwIjoxNTYzNzgzMzkyLCJqdGkiOiJ6ZTI5OHk0MnNiYSJ9.0hheSXZunt0mBE6xwUK8zq_yGjsQIAOV4Pi182MZK8VklN_f3-iHcotQgeK-i9VItMjGSYfLSM8sf36MZzAj9w',
jti: 'ze298y42sba' }
---- createCredential ----
The credential1 is: { header:
{ typ: 'JWT',
alg: 'ES256K',
kid: 'did:ala:quor:redt:QmeeasCZ9jLbXueBJ7d7csxhb#keys-1' },
payload:
{ jti: 'https://www.empresa.com/alastria/credentials/3734',
iss: 'did:ala:quor:redT:d2cb24b06139c91ef6b324a49ef844bbe6ccec97',
sub: 'did:alastria:quorum:redt:QmeeasCZ9jLbXueBJ7d7csxhb',
iat: 1589921166,
exp: 1563783392,
nbf: 1563782792,
vc:
{ '@context': 'https://w3id.org/did/v1',
type: [Array],
credentialSubject: [Object] } } }
---- PSMHash ----
The PSMHash is: 0x23e3ced77c4479f6d0f3976fbac577354fa6fd39e7c140ec7b18a092a6489cab
The PSMHashReciever is: 0x5687e4920eb17109c3f9c94dfbd6617c4f45dd2314b283947abffb2c5d7140fb
---- Create AIC ----
AIC: { createAlastriaTX:
'eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NksifQ.eyJ0byI6IjB4YmQ0YTJjODRlZGI5N2JlNWJlZmY3Y2QzNDFiZDYzNTY3ZTczZjhjOSIsImRhdGEiOiIweDZkNjlkOTlhMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAw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yeveris.io:2000',
cbu:
'https://serviceprovider.alastria.blockchainbyeveris.io/api/login/',
iat: 1589921166,
ani: 'Alastria network',
nbf: 1563782792,
exp: 1563783392,
jti: 'ze298y42sba' },
publicKey:
'0x0ce5edc204ae977d6d69fcc6b339a57b544ef4d094929f3eb918a77dfba26998e77ec5b29a379dd59bbe962e2b22745143aa2b52c4a875b7492c137eeebf4055' }
AIC Signed: eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NksifQ.eyJjcmVhdGVBbGFzdHJpYVRYIjoiZXlKMGVYQWlPaUpLVjFRaUxDSmhiR2NpT2lKRlV6STFOa3NpZlEuZXlKMGJ5STZJakI0WW1RMFlUSmpPRFJsWkdJNU4ySmxOV0psWm1ZM1kyUXpOREZpWkRZek5UWTNaVGN6Wmpoak9TSXNJbVJoZEdFaU9pSXdlRFprTmpsa09UbGhNREF3TURBd01EQXdNREF3TURBd01EQXdNREF3TURBd01EQXdNREF3TURBd01EQXdNREF3TURBd01EQXdNREF3TURBd01EQXdNREF3TURBd01EQXlNREF3TURBd01EQXdNREF3TURBd01EQXdNREF3TURBd01EQXdNREF3TURBd01EQXdNREF3TURBd01EQXdNREF3TURBd01EQXdNREF3TURBd01EQXdaVFExTURNNE1tTXhZVEF3TURBd01EQXdNREF3TURBd01EQXdNREF3TURBd01EQXdNREF3TURBd01EQXdNREF3TURBd01EQXdNREF3TURBd01EQXdNREF3TURBd01EQXdNakF3TURBd01EQXdNREF3TURBd01EQXdNREF3TURBd01EQXdNREF3TURBd01EQXdNREF3TURBd01EQXdNREF3TURBd01EQXdNREF3TURBd01EQXdNRGd5TXpBM09ETXdOak0yTlRNMU5qVTJORFl6TXpJek1ETTBOakUyTlRNNU16Y3pOelkwTXpZMk5ETTJNemsyTmpZek5qTXpOall5TXpNek16TTVOakV6TlRNM05qSXpOVE0wTXpRMk5UWTJNelEyTkRNd016a3pORE01TXpJek9UWTJNek0yTlRZeU16a3pNVE00TmpFek56TTNOalEyTmpZeU5qRXpNak0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RhZTk3N2Q2ZDY5ZmNjNmIzMzlhNTdiNTQ0ZWY0ZDA5NDkyOWYzZWI5MThhNzdkZmJhMjY5OThlNzdlYzViMjlhMzc5ZGQ1OWJiZTk2MmUyYjIyNzQ1MTQzYWEyYjUyYzRhODc1Yjc0OTJjMTM3ZWVlYmY0MDU1In0.KDuOE4Wt7piRW5iBSxEz-JwZRPjQMIYLSGnauSF6izP5mGDwO-RcAOIwkuyMxybVdB7n6VmoH0a9XH2m8rqccw
---- createPresentationRequest ----
The presentationRequest is: { header:
{ alg: 'ES256K',
typ: 'JWT',
kid: 'did:ala:quor:redt:QmeeasCZ9jLbXueBJ7d7csxhb#keys-1' },
payload:
{ jti: 'https://www.empresa.com/alastria/credentials/3734',
iss: 'did:ala:quor:redT:3342664027077aea360fa3fc762a17bacbd45698',
iat: 1589921166,
exp: 1563783392,
nbf: 1563782792,
cbu:
'https://serviceprovider.alastria.blockchainbyeveris.io/api/login/',
pr:
{ '@context': 'https://w3id.org/did/v1',
type: [Array],
procUrl: 'https://www.empresa.com/alastria/businessprocess/4583',
procHash: 'H398sjHd...kldjUYn475n',
data: [Array] } } }