Interface SAMLMessageManager

All Known Implementing Classes:
SAMLMessageManagerImpl

public interface SAMLMessageManager
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deletes any generated DSA keys This also makes the SAMLMessageManager unable to sign requests.
    generateAuthResponse(SAMLAuthRequest authRequest, String authenticatedUser)
    Generates a successful authentication response for an authentication request given the username of the authenticated user.
    void
    Generates and stores the private and public keys
     
    boolean
    The SAMLMessageManager is ready to perform generate signatures if a valid key-pair has been loaded/generated.
    parseAuthRequest(String samlRequestXML, String relayStateURL, String samlEncoding)
    Parses the non null request parameters for a SAML request into a SAML request object.
  • Method Details

    • parseAuthRequest

      SAMLAuthRequest parseAuthRequest(String samlRequestXML, String relayStateURL, String samlEncoding) throws SAMLException
      Parses the non null request parameters for a SAML request into a SAML request object.
      Parameters:
      samlRequestXML - request XML string, already URL-decoded, but still Base64 encoded and zipped
      relayStateURL - relay state URL.
      samlEncoding - SAML encoding
      Returns:
      SAML authentication request object.
      Throws:
      SAMLException - error parsing request.
    • generateAuthResponse

      SAMLAuthResponse generateAuthResponse(SAMLAuthRequest authRequest, String authenticatedUser) throws SAMLException
      Generates a successful authentication response for an authentication request given the username of the authenticated user.
      Parameters:
      authRequest - authentication request object.
      authenticatedUser - username of authenticated user.
      Returns:
      signed authentication response object.
      Throws:
      SAMLException - error generating or signing XML response.
    • generateKeys

      void generateKeys() throws SAMLException
      Generates and stores the private and public keys

      This will overwrite any existing keys.

      Throws:
      SAMLException - if there was an error generating or storing the new keys.
    • deleteKeys

      void deleteKeys()
      Deletes any generated DSA keys This also makes the SAMLMessageManager unable to sign requests.
    • hasValidKeys

      boolean hasValidKeys()
      The SAMLMessageManager is ready to perform generate signatures if a valid key-pair has been loaded/generated.
      Returns:
      true if and only if a valid key-pair exists.
    • getKeys

      Optional<KeyPair> getKeys()
      Returns:
      dsa keypair used in encryption