Hi everyone
I have some questions regarding the new JWT format, in particular, I have some doubts on his integration with DAML hub, we have an example token from DAML hub:
eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6ImRhYmwtZTk1ZTM5NzMtMTdjNy00ZmRhLTllMDYtOGQ0YTI4NGUxZDcyIn0.eyJpc3MiOiJodWIuZGFtbC5jb20vbG9naW4iLCJzdWIiOiJnb29nbGUtb2F1dGgyfDEwNDI2NzM3NTA2MjgzOTcyMDg2NiIsImV4cCI6MTY2ODc4OTEwMiwianRpIjoiOGVmNDJjNWUtMzYyYi00ZTM2LThmN2UtNmNiMGM1OWViYTg5IiwiaHR0cHM6Ly9kYW1sLmNvbS9sZWRnZXItYXBpIjp7ImFjdEFzIjpbImxlZGdlci1wYXJ0eS02MzEwN2I0My1jYjU2LTQzZjYtYWYwZS03MjUwZTQyZDVlMWQ6OjEyMjA4ZWU3N2JlMTk3NThjM2Y3ZWU5MjAzZGJmMzgzODE1ZDQzMjk5NjMxZjQxODdjOGY3YzFlNDYxOTMyYmI0NDQ2Il0sImFkbWluIjpmYWxzZSwiYXBwbGljYXRpb25JZCI6ImRhbWxodWIiLCJsZWRnZXJJZCI6ImdieW13MmM3YThqOGswMG0iLCJwYXJ0aWNpcGFudElkIjpudWxsLCJyZWFkQXMiOlsibGVkZ2VyLXBhcnR5LTYzMTA3YjQzLWNiNTYtNDNmNi1hZjBlLTcyNTBlNDJkNWUxZDo6MTIyMDhlZTc3YmUxOTc1OGMzZjdlZTkyMDNkYmYzODM4MTVkNDMyOTk2MzFmNDE4N2M4ZjdjMWU0NjE5MzJiYjQ0NDYiXX0sImh1YkNsYWltcyI6eyJsZWRnZXJJZCI6ImdieW13MmM3YThqOGswMG0iLCJvd25lciI6InVzZXItZ3JhbnQtODY4NmYwY2UtMThiYi00YjM5LTg0MjgtZDE2MTMzZjlhYjQ4IiwicGFydHkiOiJsZWRnZXItcGFydHktNjMxMDdiNDMtY2I1Ni00M2Y2LWFmMGUtNzI1MGU0MmQ1ZTFkOjoxMjIwOGVlNzdiZTE5NzU4YzNmN2VlOTIwM2RiZjM4MzgxNWQ0MzI5OTYzMWY0MTg3YzhmN2MxZTQ2MTkzMmJiNDQ0NiIsInBhcnR5TmFtZSI6Ikpvw6NvIEZyZWl0YXMifSwibGVkZ2VySWQiOiJnYnltdzJjN2E4ajhrMDBtIiwib3duZXIiOiJ1c2VyLWdyYW50LTg2ODZmMGNlLTE4YmItNGIzOS04NDI4LWQxNjEzM2Y5YWI0OCIsInBhcnR5IjoibGVkZ2VyLXBhcnR5LTYzMTA3YjQzLWNiNTYtNDNmNi1hZjBlLTcyNTBlNDJkNWUxZDo6MTIyMDhlZTc3YmUxOTc1OGMzZjdlZTkyMDNkYmYzODM4MTVkNDMyOTk2MzFmNDE4N2M4ZjdjMWU0NjE5MzJiYjQ0NDYiLCJwYXJ0eU5hbWUiOiJKb8OjbyBGcmVpdGFzIn0.QddrWAcsciBMgOZ4emUO92VjOhEA0UL3LqiMkxTWBel5On78SPkSRwm0cVJSxr3kPnXmJF3PTKSInRrQsqwcPxGJEqRMMFR0MG-AMO2QATZrAUKE_ghgNzZSvEuL634rQJk_a5VFIHk0KAhy9PiOjpQ2plZQvuWOUUsxhvZH9hc
{
"iss": "hub.daml.com/login",
"sub": "google-oauth2|104267375062839720866",
"exp": 1668789102,
"jti": "8ef42c5e-362b-4e36-8f7e-6cb0c59eba89",
"https://daml.com/ledger-api": {
"actAs": [
"ledger-party-63107b43-cb56-43f6-af0e-7250e42d5e1d::12208ee77be19758c3f7ee9203dbf383815d43299631f4187c8f7c1e461932bb4446"
],
"admin": false,
"applicationId": "damlhub",
"ledgerId": "gbymw2c7a8j8k00m",
"participantId": null,
"readAs": [
"ledger-party-63107b43-cb56-43f6-af0e-7250e42d5e1d::12208ee77be19758c3f7ee9203dbf383815d43299631f4187c8f7c1e461932bb4446"
]
},
"hubClaims": {
"ledgerId": "gbymw2c7a8j8k00m",
"owner": "user-grant-8686f0ce-18bb-4b39-8428-d16133f9ab48",
"party": "ledger-party-63107b43-cb56-43f6-af0e-7250e42d5e1d::12208ee77be19758c3f7ee9203dbf383815d43299631f4187c8f7c1e461932bb4446",
"partyName": "João Freitas"
},
"ledgerId": "gbymw2c7a8j8k00m",
"owner": "user-grant-8686f0ce-18bb-4b39-8428-d16133f9ab48",
"party": "ledger-party-63107b43-cb56-43f6-af0e-7250e42d5e1d::12208ee77be19758c3f7ee9203dbf383815d43299631f4187c8f7c1e461932bb4446",
"partyName": "João Freitas"
}
and I would like to know if it´s possible - and if so - how can we through a FE mock this structure. By the way does this token somehow relates to this token:
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsZWRnZXJJZCI6InBhcnRpY2lwYW50MSIsImFwcGxpY2F0aW9uSWQiOiJIVFRQLUpTT04tQVBJLUdhdGV3YXkiLCJzdWIiOiJsMjIwMHBfbG1zIiwic2NvcGUiOiJkYW1sX2xlZGdlcl9hcGkifQ.w_7GbMZ4fhJL75oemVCQHgQHGYaxo3yzoPtEZd_OuIE
{
"ledgerId": "gbymw2c7a8j8k00m",
"applicationId": "damlhub",
"sub": "myPartyName",
"scope": "daml_ledger_api"
}
thanks in advance