-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
persistent MongoCollections in unmodifiable map
also url-safe tokens (can be included as a query param) factor out logic from streaming / non-streaming database endpoints added login and token example to vector tile client
- Loading branch information
Showing
7 changed files
with
128 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>Conveyal Login</title> | ||
<style> | ||
body { margin: 0; padding: 0; font-family: sans-serif} | ||
#panel { | ||
display: flex; flex-direction: column; width: 20%; padding: 20px; margin: auto; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="panel"> | ||
<label for="email">Email:</label> | ||
<input type="email" id="email"></input> | ||
<label for="password">Password:</label> | ||
<input type="password" id="password"></input> | ||
<button name="login" id="login">Log In</button> | ||
</div> | ||
<script> | ||
|
||
let emailField = document.getElementById("email"); | ||
let passwordField = document.getElementById("password"); | ||
let loginButton = document.getElementById("login"); | ||
loginButton.onclick = function (e) { | ||
// TODO validate/sanitize | ||
let email = emailField.value; | ||
let password = passwordField.value; | ||
let url = `http://localhost:7070/token?email=${email}&password=${password}` | ||
fetch(url) | ||
.then(response => response.json()) | ||
.then(response => { | ||
console.log(response.token); | ||
window.location.href = `index.html?token=${response.token}`; | ||
}); | ||
}; | ||
|
||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters