Skip to content

Commit 7b6ddc6

Browse files
author
Xiaoyun Ding
committed
Add logout description for gateway
1 parent e3f5ae6 commit 7b6ddc6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

articles/spring-apps/how-to-configure-enterprise-spring-cloud-gateway.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,18 @@ You can also view or edit those properties in the Azure portal, as shown in the
122122
>
123123
> After configuring SSO, remember to set `ssoEnabled: true` for the Spring Cloud Gateway routes.
124124
125+
## Configure single sign-on (SSO) logout
126+
VMware Spring Cloud Gateway service instances provide a default API endpoint to logout of the current SSO session. The path to this endpoint is `/scg-logout`. There are two different outcomes that can be accomplished depending on how the logout endpoint is called: logout of session and redirect to UAA logout or only logout the service instance session.
127+
128+
### Logout of UAA and SSO Session
129+
Sending a GET request to the `/scg-logout` endpoint then it will send a 302 redirect response to the UAA logout URL. In order for user to be returned back to a path on the Gateway service instance, you can add a redirect parameter to the GET `/scg-logout` request. For example, if a user goes to `${serverUrl}/scg-logout?redirect=/home` in their browser they will be redirected back to `${serverUrl}/home` after logging out of UAA.
130+
131+
> [!NOTE]
132+
> The value of the redirect parameter is a valid path on the Gateway service instance. You cannot redirect to an external URL.
133+
134+
### Only Logout SSO Session
135+
If the GET request to the `/scg-logout` is sent using a XMLHttpRequest (XHR), then the 302 redirect could be swallowed and not handled in the response handler. In this case, the user would only be logged out of the SSO session on the Gateway service instance and would still have a valid UAA session. The behavior typically seen in this case is that if the user attempts to login again they are automatically sent back to gateway as authenticated from UAA.
136+
125137
## Configure cross-origin resource sharing (CORS)
126138

127139
Cross-origin resource sharing (CORS) allows restricted resources on a web page to be requested from another domain outside the domain from which the first resource was served. The available CORS configuration options are described in the following table.

0 commit comments

Comments
 (0)