Package com.atlassian.crowd.plugin.saml
Interface SAMLMessageManager
- All Known Implementing Classes:
SAMLMessageManagerImpl
public interface SAMLMessageManager
-
Method Summary
Modifier and TypeMethodDescriptionvoidDeletes 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.voidGenerates and stores the private and public keysgetKeys()booleanThe 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 zippedrelayStateURL- 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
Generates and stores the private and public keysThis 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:
trueif and only if a valid key-pair exists.
-
getKeys
- Returns:
- dsa keypair used in encryption
-