Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.

Skript AuthMe hook #100

Open
TheDGOfficial opened this issue Nov 17, 2019 · 0 comments
Open

Skript AuthMe hook #100

TheDGOfficial opened this issue Nov 17, 2019 · 0 comments
Assignees
Labels
priority: medium A medium priority issue or pull request type: enhancement New feature or request type: feature A good feature
Milestone

Comments

@TheDGOfficial
Copy link
Member

TheDGOfficial commented Nov 17, 2019

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 changed

The 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

@TheDGOfficial TheDGOfficial added type: enhancement New feature or request type: feature A good feature priority: medium A medium priority issue or pull request labels Nov 17, 2019
@TheDGOfficial TheDGOfficial added this to the 2.2.18 milestone Nov 17, 2019
@TheDGOfficial TheDGOfficial self-assigned this Nov 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
priority: medium A medium priority issue or pull request type: enhancement New feature or request type: feature A good feature
Projects
None yet
Development

No branches or pull requests

1 participant