From 3281d109f76b3980cbbd58f351b58862c7f801ad Mon Sep 17 00:00:00 2001 From: Melora Hugues Date: Tue, 17 Oct 2023 17:42:22 +0200 Subject: [PATCH] Add client approval flow --- polyculeconnect/main.go | 2 +- polyculeconnect/templates/approval.html | 44 +++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/polyculeconnect/main.go b/polyculeconnect/main.go index 55a79b4..58845ed 100644 --- a/polyculeconnect/main.go +++ b/polyculeconnect/main.go @@ -54,7 +54,7 @@ func main() { Storage: memory.New(logger.L), Issuer: conf.OpenConnectConfig.Issuer, SupportedResponseTypes: []string{"code"}, - SkipApprovalScreen: true, + SkipApprovalScreen: false, AllowedOrigins: []string{"*"}, Logger: logger.L, PrometheusRegistry: prometheus.NewRegistry(), diff --git a/polyculeconnect/templates/approval.html b/polyculeconnect/templates/approval.html index e69de29..df734fc 100644 --- a/polyculeconnect/templates/approval.html +++ b/polyculeconnect/templates/approval.html @@ -0,0 +1,44 @@ +{{ template "header.html" . }} + +
+

Grant Access

+ +
+
+ {{ if .Scopes }} +
{{ .Client }} would like to:
+
    + {{ range $scope := .Scopes }} +
  • {{ $scope }}
  • + {{ end }} +
+ {{ else }} +
{{ .Client }} has not requested any personal information
+ {{ end }} +
+
+ +
+
+
+ + + +
+
+
+
+ + + +
+
+
+ +
+ +{{ template "footer.html" . }} \ No newline at end of file