// this will open the iframe to attestation.id if first time
const useTicketProof = Authenticator.generateAuthenticationBlob(selectedTicket);
// getting a challenge
const challenge = fetch(…)…
// sign a challenge contain
const msg = '{challenge: "' + challenge + '", proof: "' + atob(useTicketProof) + '"}'
const signedMsg = web3.eth.account.signMessage(msg)
// send the challenge back to the server
fetch(URL, {method: post, body: signedMsg;}).…
// get server greenlight, fetch privileged content
…
Operational Attributes
There are a few operational attributes, most importantly ownerAddress, however, it is not discovered until webster's code runs generateAthenticationBlob, which is confusing (as webster might not expect this function to change the token object. Therefore alternatively the function can be changed:
Authenticator.assertOwnerAddress(token) // this changes the token object
This branch: https://github.com/TokenScript/TokenScript/tree/hotel-bogota/examples/sites/hotel-bogota
Pseudo code:
Operational Attributes
There are a few operational attributes, most importantly
ownerAddress
, however, it is not discovered until webster's code runsgenerateAthenticationBlob
, which is confusing (as webster might not expect this function to change the token object. Therefore alternatively the function can be changed:Which results in two operational attributes:
i.e. instead of returning the blob in a function call like originally planned, store it in the token object as Operational Attribute.