public class SAMLMessageManagerImpl extends Object implements SAMLMessageManager
| Constructor and Description |
|---|
SAMLMessageManagerImpl() |
| Modifier and Type | Method and Description |
|---|---|
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
This also makes the SAMLMessageManager unable
to sign requests.
|
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
|
Optional<KeyPair> |
getKeys() |
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.
|
void |
setAssertionNotBeforeMinutes(int assertionNotBeforeMinutes) |
void |
setAssertionNotOnOrAfterMinutes(int assertionNotOnOrAfterMinutes) |
void |
setDatabaseKeyStore(DatabaseKeyStore databaseKeyStore) |
public void afterPropertiesSet()
throws Exception
Exceptionpublic SAMLAuthRequest parseAuthRequest(String samlRequestXML, String relayStateURL, String samlEncoding) throws SAMLException
SAMLMessageManagerparseAuthRequest in interface SAMLMessageManagersamlRequestXML - request XML string, already URL-decoded, but still Base64 encoded and zippedrelayStateURL - relay state URL.samlEncoding - SAML encodingSAMLException - error parsing request.public SAMLAuthResponse generateAuthResponse(SAMLAuthRequest authRequest, String authenticatedUser) throws SAMLException
SAMLMessageManagergenerateAuthResponse in interface SAMLMessageManagerauthRequest - authentication request object.authenticatedUser - username of authenticated user.SAMLException - error generating or signing XML response.public void generateKeys()
throws SAMLException
SAMLMessageManagerThis will overwrite any existing keys.
generateKeys in interface SAMLMessageManagerSAMLException - if there was an error generating
or storing the new keys.public void deleteKeys()
SAMLMessageManagerdeleteKeys in interface SAMLMessageManagerpublic boolean hasValidKeys()
SAMLMessageManagerhasValidKeys in interface SAMLMessageManagertrue if and only if a valid key-pair
exists.public Optional<KeyPair> getKeys()
getKeys in interface SAMLMessageManagerpublic void setAssertionNotBeforeMinutes(int assertionNotBeforeMinutes)
public void setAssertionNotOnOrAfterMinutes(int assertionNotOnOrAfterMinutes)
public void setDatabaseKeyStore(DatabaseKeyStore databaseKeyStore)
Copyright © 2021 Atlassian. All rights reserved.