From 79218093c639e63034644bd5dda5e92bbb97e368 Mon Sep 17 00:00:00 2001 From: Peter Sanchez Date: Tue, 18 Jul 2023 19:14:47 -0600 Subject: [PATCH] Add support for RFC 9207 --- routes.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/routes.go b/routes.go index 39ac45c..70ce841 100644 --- a/routes.go +++ b/routes.go @@ -439,8 +439,10 @@ func (s *Service) AuthorizePOST(c echo.Context) error { return s.authorizeError(c, "", state, "server_error", err.Error()) } + origin := gctx.Server.Config.BaseURI() gmap := gobwebs.Map{ "code": code, + "iss": origin, // RFC 9207 } if state != "" { gmap["state"] = state @@ -704,6 +706,7 @@ func (s *Service) OAuthMetadata(c echo.Context) error { Doc string `json:"service_documentation"` IntroEndpoint string `json:"introspection_endpoint"` IntroAuth []string `json:"introspection_endpoint_auth_methods_supported"` + ISS bool `json:"authorization_response_iss_parameter_supported"` }{ Issuer: origin, AuthEndpoint: aURL, @@ -714,6 +717,7 @@ func (s *Service) OAuthMetadata(c echo.Context) error { Doc: s.config.DocumentationURL, IntroEndpoint: iURL, IntroAuth: []string{"none"}, + ISS: true, } return c.JSON(http.StatusOK, &ret) } -- 2.45.2