#Help with concepts
1 messages · Page 1 of 1 (latest)
Here I'm just gonna write my ideas:
/scriptevent,... Payloads and handshaking happens with that command lol, its the only way to communicate to another addon and other addons can subscribe to this event, but that means other addons can also listen and log payloads and also send the exact command so i decided to encrypt stuff but yeah now come to think of it... they don't need to decrypt... all they need is to just literally send the same command and they'd get the same response and would be treated like a verified endpoint that can use the api provided by this addon.... bruh
So kinda uhh...
Anyone have better ideas for verification?
I am kinda implementing a server to client typa system with a helper class and the scriptEventReceive event and the /scriptevent command
So i send requests and stuff currently in encrypted payloads
Kinda along the lines of:
/scriptevent plugin1:message {"from":"1","to":null,"purpose":"hs-req","data":"\u0010I\u0005\n\u0006\u000eIQI*IGI\u0002\u000fIQIZIGI\u001f\u0018IQZ\\X\\RR\\[SZ\\Y[\u0016","apiKey":"I\u0000I"}
That's kinda
How i from an addon
Request a handshake to another addon (plugin)
And vice versa
Each endpoint has its own api keys you can use outside
And also its send key to interact with certain apis it relies on.
Kinda like:
Addon1: heyo, addon2 can you add this data to your database "db"? {player: {name: player.name, id: player.id, rank: 0}}
Addon2: sure, give me an apikey tho.
Addon1: here
Addon2: alright then, done
Addon1: how you not a fraud trying to fake a response? Give me an api key
Addon2: here
And so on.
there alredy is a comunication class between 2 addons