-
-
Notifications
You must be signed in to change notification settings - Fork 2
Skript AuthMe hook #100
Description
Is your feature request related to a problem? Please describe.
We do not have any authentication plugin support in Skript. A general authentication API like Vault does not exist, so we should only support AuthMe at first, and add other auth plugins later if requested by a separate issue.
Describe the solution you'd like
Add AuthMe hook to Skript. Some syntax recommendations:
%player% is logged in
(%string% is password of player|%player%'s password is %string%|password of %player% is %string%) # obviously just a condition, not an event-value or expression since the password is not reversible (crypted/hashed), only can be checked
# other things that I don't know if it exists in the AuthMe API, but will be nice additions if it.
on logon: # when player logs in using password, or automatically logged-in by registering
on register: # when player registers
on unregister: # when player un-registers
on password change: # when player's password is changedThe first one can be used when e.g sending something to operators/server admins that should not be displayed when not logged-in as it contains sensitive information, the second one is obviously not for cracking passwords, only for writing security scripts, e.g the script below will prevent the player from sending his password into the public chat.
on chat:
if message is player's password: # or player's password is message or password of player is message
cancel event
send "&cYou can't send your password into public chat."The last one could be used for e.g warning the user, or doing some security things. For example I can code a script that disables deleting the ASkyBlock island of the player if the password is changed in the last 10 minutes, etc., or if I have a e-mail script, I can send an email to the player's email address when password is changed.
Another recommendation
Also adding a country/locale system to Skript would be great. For example, we can add a locale type that wraps java.util.Locale, or a country type that wraps an enum that contains country codes and names.
We should can also be able to get the player's country, from their IP address. It would be great for example if I'm a high-security admin that writes a script that asks security questions or block changing password for some minutes if player is logged on from another country, combining it with the on logon event.
Describe alternatives you've considered
Some add-ons exist for this purpose, but adding it into vanilla Skript would be great, since it is easy.
Additional information
N/A