-
-
Notifications
You must be signed in to change notification settings - Fork 5
Secured Web Request
Elijah Brown edited this page Mar 14, 2024
·
5 revisions
This module is a wrapper over Unity Web Request - it handles encrypted data both sending and receiving. It uses one of the crypto providers of your choice, which will perform encryption/decryption. It uses Unity Crypto Library already embedded in GameShield for its operation.
You can provide auto-configuration using Setup Wizzard or setup module manual:
// Initialize Module
Core.GameShield.Main.AddModule<SecuredRequest>();
// Get Module for API Requests
Core.GameShield.Main.GetModule<SecuredRequest>().PauseDetector(true);
Unified for all modules Cheating Detection Event:
// Get Information when cheating detected
EventMessenger.Main.Subscribe<SecurityWarningPayload>(payload => {
// Work with payload
});
Send Encrypted Request:
Core.GameShield.Main.GetModule<SecuredRequest>().Post("https://example.com/", new AESProvider(), (response) => {
// Request Complete, Return Response
}, error => {
// Request Error
});
This module provide IShieldModule interface methods with own functional extension:
Method | Usage |
---|---|
SetupModule | Setup Current Module with configuration and force reinitialization if it needed |
Disconnect | Disconnect Current Module |
PauseDetector | Pause / Resume cheating detection for current module |
IsPaused | Check if current module is paused |
GetModuleInfo | Get Current Module info (used in assemblies searching) |
SendRequest | Send any encrypted web-request and return decrypted response in callback or error |
Post | Send POST encrypted web-request and return decrypted response in callback or error |
Put | Send PUT encrypted web-request and return decrypted response in callback or error |