Add support for RFC 9207
1 files changed, 4 insertions(+), 0 deletions(-)

M routes.go
M routes.go +4 -0
@@ 439,8 439,10 @@ func (s *Service) AuthorizePOST(c echo.C
 		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.C
 		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.C
 		Doc:           s.config.DocumentationURL,
 		IntroEndpoint: iURL,
 		IntroAuth:     []string{"none"},
+		ISS:           true,
 	}
 	return c.JSON(http.StatusOK, &ret)
 }