use of org.forgerock.openam.utils.AMKeyProvider in project OpenAM by OpenRock.
the class SigProviderTest method setUp.
@BeforeClass
public void setUp() {
// The keystore properties required to bootstrap this class are setup in the POM
keyProvider = new AMKeyProvider();
sigProvider = SigManager.getSigInstance();
}
use of org.forgerock.openam.utils.AMKeyProvider in project OpenAM by OpenRock.
the class PersistentCookieAuthModuleTest method setUp.
@BeforeMethod
public void setUp() {
jwtSessionModule = mock(ServletJwtSessionModule.class);
amKeyProvider = mock(AMKeyProvider.class);
amLoginModuleBinder = mock(AMLoginModuleBinder.class);
coreWrapper = mock(CoreWrapper.class);
persistentCookieAuthModule = new PersistentCookieAuthModule(jwtSessionModule, amKeyProvider, coreWrapper) {
@Override
protected String getKeyAlias(String orgName) throws SSOException, SMSException {
return "KEY_ALIAS";
}
};
persistentCookieAuthModule.setAMLoginModule(amLoginModuleBinder);
given(amKeyProvider.getPrivateKeyPass()).willReturn("PRIVATE_KEY_PASS");
given(amKeyProvider.getKeystoreType()).willReturn("KEYSTORE_TYPE");
given(amKeyProvider.getKeystoreFilePath()).willReturn("KEYSTORE_FILE_PATH");
given(amKeyProvider.getKeystorePass()).willReturn("KEYSTORE_PASS".toCharArray());
HttpServletRequest request = mock(HttpServletRequest.class);
HttpServletResponse response = mock(HttpServletResponse.class);
given(amLoginModuleBinder.getHttpServletRequest()).willReturn(request);
given(amLoginModuleBinder.getHttpServletResponse()).willReturn(response);
given(amLoginModuleBinder.getRequestOrg()).willReturn("REQUEST_ORG");
}
use of org.forgerock.openam.utils.AMKeyProvider in project OpenAM by OpenRock.
the class XMLSignatureManagerTest method setUp.
@BeforeClass
public void setUp() {
KeyProvider keyProvider = new AMKeyProvider(true, KEY_STORE_FILE, KEY_STORE_PASS, KEY_STORE_TYPE, DEFAULT_PRIVATE_KEY_PASS);
SignatureProvider signatureProvider = new AMSignatureProvider();
xmlSignatureManager = XMLSignatureManager.getInstance(keyProvider, signatureProvider);
}
Aggregations