-
Notifications
You must be signed in to change notification settings - Fork 12
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
Make API token optional for user api routes #159
Conversation
dev should probably override this setting, but keeping it as-is for now
$response = $this->getjson('/plugins/info/1.1?action=query_plugins'); | ||
$response->assertStatus(200); | ||
})->skip(fn() => config('app.aspirecloud.api_authentication_enable'), 'API authentication is enabled'); | ||
// TODO: write tests for real and and bad auth tokens |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// TODO: write tests for real and and bad auth tokens | |
// TODO: write tests for real and bad auth tokens |
Double "and". Possibly jittery from too much coffee 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
☕️☕️☕️ + 🌲🌲 = 😳
Anyway I already tested a bad token so I just need to generate and use a real one, and hopefully I'll have that knocked out before I merge this (it's already getting deployed to .io before then)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good aside from the style error 👍
I decided to kick pint to the curb in CI, it's too slow to be worth it. If prettier can do PER-CS, I'll consider switching to it (I don't know about its php 8.4 support but we're not using any 8.4 syntax yet) |
Pull Request
What changed?
Made the API token optional, but validated if present.
Removed the
app.aspirecloud.api_authentication_enable
option. It's always enabled and optional now, except for admin routes where it's always been mandatory.Unrelated change: sets the default error_reporting level to
E_ALL & ~E_DEPRECATED
.Why did it change?
We should remove the speedbumps on adoption, plus it creates a privacy headache, being linked to registration email and all that. We can start throttling unauthenticated users if we need to.
We also don't need deprecation notices spamming up stderr on production.
Did you fix any specific issues?
Closes: #157
CERTIFICATION
By opening this pull request, I do agree to abide by the Code of Conduct and be bound by the terms of the Contribution Guidelines in effect on the date and time of my contribution as proven by the revision information in GitHub.