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

Add simple form based login page to UI #2755

Merged
merged 1 commit into from
Feb 19, 2020
Merged

Add simple form based login page to UI #2755

merged 1 commit into from
Feb 19, 2020

Conversation

dain
Copy link
Member

@dain dain commented Feb 7, 2020

No description provided.

@dain dain requested a review from electrum February 7, 2020 14:19
@cla-bot cla-bot bot added the cla-signed label Feb 7, 2020
@dain dain force-pushed the ui-login branch 2 times, most recently from 3c2c3ca to 62709dd Compare February 8, 2020 12:10
@dain dain mentioned this pull request Feb 8, 2020
@dain dain force-pushed the ui-login branch 2 times, most recently from bcbb146 to 2beb90c Compare February 9, 2020 19:44
presto-main/pom.xml Show resolved Hide resolved
return Optional.empty();
}

if (!isHttps(request)) {
Copy link
Member

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

Copy link
Member Author

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?

private static String getRedirectLocation(HttpServletRequest request, String path, String queryParameter)
{
String proto = firstNonNull(emptyToNull(request.getHeader(X_FORWARDED_PROTO)), request.getScheme());
HttpUriBuilder builder = uriBuilder()
Copy link
Member

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

Copy link
Member Author

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.

presto-main/src/main/resources/webapp/login.html Outdated Show resolved Hide resolved
@dain dain merged commit b97777d into trinodb:master Feb 19, 2020
@dain dain mentioned this pull request Feb 19, 2020
6 tasks
@dain dain deleted the ui-login branch February 19, 2020 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants