|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.crowd.plugin.saml.SAMLMessageManagerImpl
public class SAMLMessageManagerImpl
Constructor Summary | |
---|---|
SAMLMessageManagerImpl()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
Performs initialisation of the manager by loading the template SAML XML response and DSA keys from disk. |
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()
|
protected String |
getPrivateKeyFilePath()
|
protected String |
getPublicKeyFilePath()
|
boolean |
hasValidKeys()
The SAMLMessageManager is ready to perform generate signatures if a valid key-pair has been loaded/generated. |
protected void |
loadKeys()
Loads the private and public keys in the Crowd home directory under the "/saml" folder. |
SAMLAuthRequest |
parseAuthRequest(String samlRequestXML,
String relayStateURL)
Parses the non null request parameters for a SAML request into a SAML request object. |
void |
setAssertionNotBeforeMinutes(int assertionNotBeforeMinutes)
|
void |
setAssertionNotOnOrAfterMinutes(int assertionNotOnOrAfterMinutes)
|
void |
setEncryptionAlgorithm(String encryptionAlgorithm)
|
void |
setHomeLocator(com.atlassian.config.HomeLocator homeLocator)
|
void |
setKeyPath(String keyPath)
|
void |
setKeySize(int keySize)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SAMLMessageManagerImpl()
Method Detail |
---|
public void afterPropertiesSet() throws Exception
Exception
public SAMLAuthRequest parseAuthRequest(String samlRequestXML, String relayStateURL) throws SAMLException
SAMLMessageManager
parseAuthRequest
in interface SAMLMessageManager
samlRequestXML
- request XML string.relayStateURL
- relay state URL.
SAMLException
- error parsing request.public SAMLAuthResponse generateAuthResponse(SAMLAuthRequest authRequest, String authenticatedUser) throws SAMLException
SAMLMessageManager
generateAuthResponse
in interface SAMLMessageManager
authRequest
- authentication request object.authenticatedUser
- username of authenticated user.
SAMLException
- error generating or signing XML response.public void generateKeys() throws SAMLException
SAMLMessageManager
generateKeys
in interface SAMLMessageManager
SAMLException
- if there was an error generating
or storing the new keys.public void deleteKeys()
SAMLMessageManager
deleteKeys
in interface SAMLMessageManager
protected void loadKeys() throws SAMLException
SAMLException
- if there was an error loading the
key-pair from disk.protected String getPublicKeyFilePath()
protected String getPrivateKeyFilePath()
public String getKeyPath()
getKeyPath
in interface SAMLMessageManager
public boolean hasValidKeys()
SAMLMessageManager
hasValidKeys
in interface SAMLMessageManager
true
if and only if a valid key-pair
exists.public void setHomeLocator(com.atlassian.config.HomeLocator homeLocator)
public void setEncryptionAlgorithm(String encryptionAlgorithm)
public void setKeySize(int keySize)
public void setAssertionNotBeforeMinutes(int assertionNotBeforeMinutes)
public void setAssertionNotOnOrAfterMinutes(int assertionNotOnOrAfterMinutes)
public void setKeyPath(String keyPath)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |