Server Protector
The ServerProtector
class is useful to protect the server from the unauthorized accesses This class will generate a secret to share with the users allowed to use this server
Author
N7ghtm4r3 - Tecknobit
Since
2.2.0
Constructors
Link copied to clipboard
Constructor to init the ServerProtector
Properties
Link copied to clipboard
DELETE_SERVER_SECRET_AND_INTERRUPT_COMMAND
command to delete the current server secret and interrupt the server workflowLink copied to clipboard
DELETE_SERVER_SECRET_COMMAND
command to delete the current server secretLink copied to clipboard
preferences
instance to manage the storage of the server secretLink copied to clipboard
RECREATE_SERVER_SECRET_COMMAND
command to recreate the server secretLink copied to clipboard
saveMessage
the message to print when the server secret has been generated the start of the message is "Note: is not an error, but is an alert!Link copied to clipboard
SERVER_SECRET_KEY
the server secret keyFunctions
Link copied to clipboard
Method to delete the current server secret No-any params required
Method to delete the current server secret
Link copied to clipboard
Method to generate and store a new server secret No-any params required
Link copied to clipboard
Method to get the current server secret No-any params required
Link copied to clipboard
Method to regenerate and store a new server secret, overwriting the current secret No-any params required
Link copied to clipboard
Method to compare a server secret with the current stored by the server
Link copied to clipboard
Method to store a new server secret