use of org.opensaml.saml.saml2.core.SessionIndex in project ddf by codice.
the class SamlProtocol method createLogoutRequest.
public static LogoutWrapper<LogoutRequest> createLogoutRequest(Issuer issuer, NameID nameId, String id, List<String> sessionIndexes) {
LogoutRequest logoutRequest = logoutRequestBuilder.buildObject();
logoutRequest.setID(id);
logoutRequest.setIssuer(issuer);
logoutRequest.setNameID(nameId);
logoutRequest.setIssueInstant(DateTime.now());
logoutRequest.setVersion(SAMLVersion.VERSION_20);
SessionIndexBuilder builder = new SessionIndexBuilder();
for (String index : sessionIndexes) {
SessionIndex sessionIndexObject = builder.buildObject();
sessionIndexObject.setSessionIndex(index);
logoutRequest.getSessionIndexes().add(sessionIndexObject);
}
return new LogoutWrapperImpl<>(logoutRequest);
}
Aggregations