Class LogoutMessageImpl

java.lang.Object
ddf.security.samlp.impl.LogoutMessageImpl
All Implemented Interfaces:
ddf.security.samlp.LogoutMessage

public class LogoutMessageImpl extends Object implements ddf.security.samlp.LogoutMessage
  • Constructor Details

    • LogoutMessageImpl

      public LogoutMessageImpl(org.codice.ddf.platform.util.uuidgenerator.UuidGenerator generator)
  • Method Details

    • getIdpSingleLogoutLocation

      public String getIdpSingleLogoutLocation(org.opensaml.saml.saml2.metadata.IDPSSODescriptor descriptor)
    • extractXmlObject

      public ddf.security.samlp.LogoutWrapper<org.opensaml.saml.common.SignableSAMLObject> extractXmlObject(String samlLogoutResponse) throws ddf.security.samlp.LogoutSecurityException, XMLStreamException
      Specified by:
      extractXmlObject in interface ddf.security.samlp.LogoutMessage
      Throws:
      ddf.security.samlp.LogoutSecurityException
      XMLStreamException
    • extractSamlLogoutResponse

      public ddf.security.samlp.LogoutWrapper<org.opensaml.saml.saml2.core.LogoutResponse> extractSamlLogoutResponse(String samlLogoutResponse) throws XMLStreamException, ddf.security.samlp.LogoutSecurityException
      Specified by:
      extractSamlLogoutResponse in interface ddf.security.samlp.LogoutMessage
      Throws:
      XMLStreamException
      ddf.security.samlp.LogoutSecurityException
    • extractSamlLogoutRequest

      public ddf.security.samlp.LogoutWrapper<org.opensaml.saml.saml2.core.LogoutRequest> extractSamlLogoutRequest(String samlLogoutResponse) throws XMLStreamException, ddf.security.samlp.LogoutSecurityException
      Specified by:
      extractSamlLogoutRequest in interface ddf.security.samlp.LogoutMessage
      Throws:
      XMLStreamException
      ddf.security.samlp.LogoutSecurityException
    • buildLogoutRequest

      public ddf.security.samlp.LogoutWrapper<org.opensaml.saml.saml2.core.LogoutRequest> buildLogoutRequest(String nameIdString, String issuerOrEntityId, List<String> sessionIndexes)
      Returns a new LogoutRequest with a randomly generated ID, the current time for the IssueInstant, and Version set to "2.0"
      Specified by:
      buildLogoutRequest in interface ddf.security.samlp.LogoutMessage
      Parameters:
      nameIdString - NameId of user to log out
      issuerOrEntityId - The Issuer of the LogoutRequest
      sessionIndexes - The list of session indexes selected for log out
      Returns:
      the built LogoutRequest
    • buildLogoutRequest

      public ddf.security.samlp.LogoutWrapper<org.opensaml.saml.saml2.core.LogoutRequest> buildLogoutRequest(String nameIdString, String issuerOrEntityId, String id, List<String> sessionIndexes)
    • buildLogoutResponse

      public ddf.security.samlp.LogoutWrapper<org.opensaml.saml.saml2.core.LogoutResponse> buildLogoutResponse(String issuerOrEntityId, String statusCodeValue)
      Specified by:
      buildLogoutResponse in interface ddf.security.samlp.LogoutMessage
      Parameters:
      issuerOrEntityId - the issuer or entity id to use when building the response
      statusCodeValue - the success, failure or partial logout status code
      Returns:
      LogoutResponse
    • buildLogoutResponse

      public ddf.security.samlp.LogoutWrapper<org.opensaml.saml.saml2.core.LogoutResponse> buildLogoutResponse(String issuerOrEntityId, String statusCodeValue, String inResponseTo)
      Specified by:
      buildLogoutResponse in interface ddf.security.samlp.LogoutMessage
    • buildLogoutResponse

      public ddf.security.samlp.LogoutWrapper<org.opensaml.saml.saml2.core.LogoutResponse> buildLogoutResponse(String issuerOrEntityId, String topLevelStatusCode, String secondLevelStatusCode, String inResponseTo)
      Specified by:
      buildLogoutResponse in interface ddf.security.samlp.LogoutMessage
    • getElementFromSaml

      public Element getElementFromSaml(ddf.security.samlp.LogoutWrapper xmlObject) throws ddf.security.samlp.LogoutSecurityException
      Specified by:
      getElementFromSaml in interface ddf.security.samlp.LogoutMessage
      Throws:
      ddf.security.samlp.LogoutSecurityException
    • sendSamlLogoutRequest

      public String sendSamlLogoutRequest(ddf.security.samlp.LogoutWrapper request, String targetUri, boolean isSoap, @Nullable javax.servlet.http.Cookie cookie) throws IOException, ddf.security.samlp.LogoutSecurityException
      Specified by:
      sendSamlLogoutRequest in interface ddf.security.samlp.LogoutMessage
      Throws:
      IOException
      ddf.security.samlp.LogoutSecurityException
    • signSamlGetResponse

      public URI signSamlGetResponse(ddf.security.samlp.LogoutWrapper samlObject, URI target, String relayState) throws ddf.security.samlp.LogoutSecurityException, ddf.security.samlp.SignatureException, IOException
      Specified by:
      signSamlGetResponse in interface ddf.security.samlp.LogoutMessage
      Throws:
      ddf.security.samlp.LogoutSecurityException
      ddf.security.samlp.SignatureException
      IOException
    • signSamlGetRequest

      public URI signSamlGetRequest(ddf.security.samlp.LogoutWrapper samlObject, URI target, String relayState) throws ddf.security.samlp.LogoutSecurityException, ddf.security.samlp.SignatureException, IOException
      Specified by:
      signSamlGetRequest in interface ddf.security.samlp.LogoutMessage
      Throws:
      ddf.security.samlp.LogoutSecurityException
      ddf.security.samlp.SignatureException
      IOException
    • setSystemCrypto

      public void setSystemCrypto(ddf.security.samlp.impl.SystemCrypto systemCrypto)
    • getUuidGenerator

      public org.codice.ddf.platform.util.uuidgenerator.UuidGenerator getUuidGenerator()