-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add simple form based login page to UI #2755
Conversation
3c2c3ca
to
62709dd
Compare
bcbb146
to
2beb90c
Compare
presto-main/src/main/java/io/prestosql/server/ui/FormWebUiAuthenticationManager.java
Outdated
Show resolved
Hide resolved
return Optional.empty(); | ||
} | ||
|
||
if (!isHttps(request)) { |
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.
We might want to fail here if a password was provided
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.
There is no "fail" in this code. We either take the login on redirect back to the login page. Which would you prefer?
presto-main/src/main/java/io/prestosql/server/ui/FormWebUiAuthenticationManager.java
Outdated
Show resolved
Hide resolved
private static String getRedirectLocation(HttpServletRequest request, String path, String queryParameter) | ||
{ | ||
String proto = firstNonNull(emptyToNull(request.getHeader(X_FORWARDED_PROTO)), request.getScheme()); | ||
HttpUriBuilder builder = uriBuilder() |
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.
Use the JAX-RS URI builder
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.
The JAX-RS builder is not a generic builder. It can't build a URI from raw parts, and instead builds URIs from templates or existing URIs.
No description provided.