Skip to content

Commit

Permalink
Merge pull request #381 from luozhouyang/master
Browse files Browse the repository at this point in the history
Fixed README code block
  • Loading branch information
pitbulk authored Mar 3, 2023
2 parents 03afb44 + aaf1943 commit 5a58410
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 @@ -647,6 +647,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 @@ -671,12 +672,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 5a58410

Please sign in to comment.