Allow customization of redirect strategy

The default redirect strategy will provide authorization redirect
URI within HTTP 302 response Location header.
Allowing the configuration of custom redirect strategy will provide
an option for the clients to obtain the authorization URI from e.g.
HTTP response body as JSON payload, without a need to handle
automatic redirection initiated by the HTTP Location header.

Closes gh-11373
This commit is contained in:
Igor Bolic
2022-06-17 09:42:50 +02:00
committed by Rob Winch
parent c9f8d2b111
commit efaee4e56b
27 changed files with 712 additions and 2 deletions

View File

@@ -500,6 +500,9 @@ oauth2-login.attlist &=
oauth2-login.attlist &=
## Reference to the OAuth2AuthorizationRequestResolver
attribute authorization-request-resolver-ref {xsd:token}?
oauth2-login.attlist &=
## Reference to the authorization RedirectStrategy
attribute authorization-redirect-strategy-ref {xsd:token}?
oauth2-login.attlist &=
## Reference to the OAuth2AccessTokenResponseClient
attribute access-token-response-client-ref {xsd:token}?
@@ -547,6 +550,9 @@ authorization-code-grant =
authorization-code-grant.attlist &=
## Reference to the AuthorizationRequestRepository
attribute authorization-request-repository-ref {xsd:token}?
authorization-code-grant.attlist &=
## Reference to the authorization RedirectStrategy
attribute authorization-redirect-strategy-ref {xsd:token}?
authorization-code-grant.attlist &=
## Reference to the OAuth2AuthorizationRequestResolver
attribute authorization-request-resolver-ref {xsd:token}?

View File

@@ -1651,6 +1651,12 @@
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="authorization-redirect-strategy-ref" type="xs:token">
<xs:annotation>
<xs:documentation>Reference to the authorization RedirectStrategy
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="access-token-response-client-ref" type="xs:token">
<xs:annotation>
<xs:documentation>Reference to the OAuth2AccessTokenResponseClient
@@ -1754,6 +1760,12 @@
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="authorization-redirect-strategy-ref" type="xs:token">
<xs:annotation>
<xs:documentation>Reference to the authorization RedirectStrategy
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="authorization-request-resolver-ref" type="xs:token">
<xs:annotation>
<xs:documentation>Reference to the OAuth2AuthorizationRequestResolver