com.atlassian.crowd.plugin.saml
Interface SAMLMessageManager

All Known Implementing Classes:
SAMLMessageManagerImpl

public interface SAMLMessageManager


Method Summary
 void deleteKeys()
          Deletes any generated DSA keys in the "/plugin-data/crowd-saml-plugin" folder.
 SAMLAuthResponse generateAuthResponse(SAMLAuthRequest authRequest, String authenticatedUser)
          Generates a successful authentication response for an authentication request given the username of the authenticated user.
 void generateKeys()
          Generates and stores the private and public keys in the Crowd home directory under the "/plugin-data/crowd-saml-plugin" folder.
 String getKeyPath()
           
 boolean hasValidKeys()
          The SAMLMessageManager is ready to perform generate signatures if a valid key-pair has been loaded/generated.
 SAMLAuthRequest parseAuthRequest(String samlRequestXML, String relayStateURL, String samlEncoding)
          Parses the non null request parameters for a SAML request into a SAML request object.
 

Method Detail

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.
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 in the Crowd home directory under the "/plugin-data/crowd-saml-plugin" folder.

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 in the "/plugin-data/crowd-saml-plugin" folder. This also makes the SAMLMessageManager unable to sign requests.


getKeyPath

String getKeyPath()
Returns:
directory path of the stored key-pair.

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.


Copyright © 2013 Atlassian. All Rights Reserved.