diff --git a/pom.xml b/pom.xml index b248a45..7615992 100644 --- a/pom.xml +++ b/pom.xml @@ -36,6 +36,10 @@ io.quarkus quarkus-resteasy-reactive + + io.quarkus + quarkus-resteasy-reactive-qute + io.quarkus quarkus-junit5 diff --git a/src/main/java/com/ysoft/geecon/OAuthResource.java b/src/main/java/com/ysoft/geecon/OAuthResource.java new file mode 100644 index 0000000..ad79717 --- /dev/null +++ b/src/main/java/com/ysoft/geecon/OAuthResource.java @@ -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"; +// } +} diff --git a/src/main/resources/templates/hello.html b/src/main/resources/templates/hello.html new file mode 100644 index 0000000..5a16293 --- /dev/null +++ b/src/main/resources/templates/hello.html @@ -0,0 +1,77 @@ + + + + + + Login Page + + + +
+

Login

+
+
+ + +
+
+ + +
+ +
+
+ +