Skip to content

Commit

Permalink
Fixed README
Browse files Browse the repository at this point in the history
  • Loading branch information
luozhouyang committed Apr 17, 2022
1 parent c50b749 commit aaf1943
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,7 @@ If we don't want that processSLO to destroy the session, pass the keepLocalSessi

#### Initiate SLO
In order to send a Logout Request to the IdP:

```java
Auth auth = new Auth(request, response);

Expand All @@ -673,12 +674,14 @@ if (session.getAttribute("sessionIndex") != null) {
sessionIndex = session.getAttribute("sessionIndex").toString();
}
auth.logout(null, new LogoutRequestParams(sessionIndex, nameId, nameIdFormat));
```java
```

The Logout Request will be sent signed or unsigned based on the security settings 'onelogin.saml2.security.logoutrequest_signed'

The IdP will return the Logout Response through the user's client to the Single Logout Service of the SP.

We can set a 'RelayState' parameter containing a return url to the login function:

```java
String returnUrl = 'https://example.com';
auth.logout(relayState=returnUrl)
Expand Down

0 comments on commit aaf1943

Please sign in to comment.