Login page

This commit is contained in:
Dusan Jakub
2023-09-11 16:32:56 +02:00
parent 24f51490d5
commit 42dc3e4e5c
3 changed files with 109 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
package com.ysoft.geecon;
import io.quarkus.qute.Template;
import io.quarkus.qute.TemplateInstance;
import jakarta.inject.Inject;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.MediaType;
@Path("/auth")
public class OAuthResource {
@Inject
Template hello;
@GET
@Produces(MediaType.TEXT_HTML)
public TemplateInstance get(@QueryParam("login_hint") String loginHint) {
return hello.data("loginHint", loginHint);
}
//
// @GET
// @Produces(MediaType.TEXT_PLAIN)
// public String hello() {
// return "Auth";
// }
}

View File

@@ -0,0 +1,77 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login Page</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.login-container {
background-color: #fff;
padding: 20px;
border-radius: 5px;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}
.login-container h2 {
text-align: center;
}
.form-group {
margin-bottom: 20px;
}
.form-group label {
font-weight: bold;
display: block;
}
.form-group input {
width: 100%;
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
}
.login-button {
width: 100%;
background-color: #007BFF;
color: #fff;
border: none;
padding: 10px;
border-radius: 5px;
cursor: pointer;
}
.login-button:hover {
background-color: #0056b3;
}
</style>
</head>
<body>
<div class="login-container">
<h2>Login</h2>
<form action="" method="post">
<div class="form-group">
<label for="username">Username:</label>
<input type="text" id="username" name="username" value="{loginHint}" required>
</div>
<div class="form-group">
<label for="password">Password:</label>
<input type="password" id="password" name="password" required>
</div>
<button type="submit" class="login-button">Login</button>
</form>
</div>
</body>
</html>