Extended balance-dependent authentication algorithm
Extended balance-dependent authentication algorithm
graph TD;
SubGraphSession7 --> SubGraphAuthOk;
SubGraphAuthOk7 --> SubGraphSession8;
SubGraphSession8 --> SubGraphSession2;
subgraph "Server backend";
SubGraphAuthOk[Catch contract by balance transfer trx — access token] --> SubGraphAuthOk1[Contract and session are still active?];
SubGraphAuthOk1 --> SubGraphAuthOk2[Check sender address from transfer trx — equals to contract owner];
SubGraphAuthOk2 --> SubGraphAuthOk3[Check transfer trx data for uniqueness — does not exist in contract topics];
SubGraphAuthOk3 --> SubGraphAuthOk4[Check transfer trx data — equals to signed by backend value of transfered tokens];
SubGraphAuthOk4 --> SubGraphAuthOk5[Store transfer trx data in smart contract topics];
SubGraphAuthOk5 --> SubGraphAuthOk6[Call updateState function on auth smart contract];
SubGraphAuthOk6 --> SubGraphAuthOk7[Do job/processing and return response with data];
end;
subgraph "In-browser frontend";
SubGraphSession1(Auth with MetaMask — deploy auth smart contract) --> SubGraphSession2[Handle UX/UI action];
SubGraphSession2 --> SubGraphSession3[Generate random and unique balance change — auth ray amount]
SubGraphSession3 --> SubGraphSession4[Transfer auth ray amount to auth smart contract]
SubGraphSession4 --> SubGraphSession5[Set auth ray amount signature to trx data]
SubGraphSession5 --> SubGraphSession6[Use transfer trx hash as access token];
SubGraphSession6 --> SubGraphSession7[Request the access from backend by access token];
SubGraphSession8[Render data from backend responce in browser];
end;
Further steps
- Revisit/refactor trivial authentication algorithm
- Add trivial balance-dependent authentication algorithm
- Add a comparison
- Integration with oracles: biometric, external authentication events.
WIP
Edited by Konstantin Narkhov