Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication as LuckPerms extension #7

Open
Timtendo12 opened this issue Jan 14, 2023 · 4 comments
Open

Authentication as LuckPerms extension #7

Timtendo12 opened this issue Jan 14, 2023 · 4 comments

Comments

@Timtendo12
Copy link

Hi!

I can't seem to be able to get the authentication working. I tried adding this to the startup command:

java -DLUCKPERMS_REST_AUTH=true -DLUCKPERMS_REST_AUTH_KEYS=<authkey> ..(rest of my startup command line)

I even have them setup as a env variable using the "export" command on my linux server but I keep getting the error:

{
    "error": "You are not authorized to access this endpoint."
}
@lucko
Copy link
Member

lucko commented Jan 29, 2023

Try:

java -Dluckperms.rest.auth=true -Dluckperms.rest.auth.keys=<authkey> ..(rest of my startup command line)

and then make HTTP requests with the following header

Authorization: Bearer <authkey>

If that doesn't work, please give more detailed reproduction steps and I can have a deeper look. :)

@Timtendo12
Copy link
Author

Hmm, It still does not seem to be able to authenticate:

How to reproduce:

Running as a LuckPerms extension on Velocity

My full startup command:

java -Dluckperms.rest.auth=true -Dluckperms.rest.auth.keys=Q8LZlntXcPwS2nhnbgqqFRafH0zVna12 -Xms128M -Xmx{{SERVER_MEMORY}}M -XX:+UseG1GC -XX:G1HeapRegionSize=4M -XX:+UnlockExperimentalVMOptions -XX:+ParallelRefProcEnabled -XX:+AlwaysPreTouch -XX:MaxInlineLevel=15 -jar {{SERVER_JARFILE}}

Luckperms startup log:
https://hastebin.com/share/ipunabuqic.markdown

Postman settings:
image

@lucko
Copy link
Member

lucko commented Feb 1, 2023

That error does not look like it's coming from LuckPerms

@Timtendo12
Copy link
Author

Hmm weird, I'll continue troubleshooting... However, if I don't get it to work you think I could hardcode the credentials into the jar?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants