use of com.sun.identity.shared.debug.Debug in project OpenAM by OpenRock.
the class JCECrypt method createInstance.
private static AMEncryption createInstance(String password) {
AMEncryption instance;
// Construct the encryptor class
String encClass = System.getProperty(ENCRYPTOR_CLASS_PROPERTY, DEFAULT_ENCRYPTOR_CLASS);
try {
instance = Class.forName(encClass).asSubclass(AMEncryption.class).newInstance();
} catch (Exception e) {
Debug debug = Debug.getInstance("amSDK");
debug.error("JCECrypt.createInstance Unable to get class instance: " + encClass + ", falling back to the" + " default implementation: " + DEFAULT_ENCRYPTOR_CLASS, e);
instance = new JCEEncryption();
}
try {
((ConfigurableKey) instance).setPassword(password);
} catch (Exception e) {
Debug debug = Debug.getInstance("amSDK");
if (debug != null) {
debug.error("JCECrypt.createInstance: failed to set password-based key", e);
}
}
return instance;
}
use of com.sun.identity.shared.debug.Debug in project OpenAM by OpenRock.
the class ResourceEnvIPConditionTest method setUp.
@BeforeMethod
public void setUp() {
Debug debug = mock(Debug.class);
condition = new ResourceEnvIPCondition(debug);
token = mock(SSOToken.class);
subject = new Subject();
subject.getPrivateCredentials().add(token);
}
use of com.sun.identity.shared.debug.Debug in project OpenAM by OpenRock.
the class SessionConditionTest method setUp.
@BeforeMethod
public void setUp() {
Debug debug = mock(Debug.class);
coreWrapper = mock(CoreWrapper.class);
timeService = mock(TimeService.class);
condition = new SessionCondition(debug, coreWrapper, timeService);
}
use of com.sun.identity.shared.debug.Debug in project OpenAM by OpenRock.
the class LEAuthLevelConditionTest method setUp.
@BeforeMethod
public void setUp() {
Debug debug = mock(Debug.class);
authUtils = mock(CoreWrapper.class);
condition = new LEAuthLevelCondition(debug, authUtils);
}
use of com.sun.identity.shared.debug.Debug in project OpenAM by OpenRock.
the class AuthenticateToRealmConditionTest method setUp.
@BeforeMethod
public void setUp() {
Debug debug = mock(Debug.class);
coreWrapper = mock(EntitlementCoreWrapper.class);
condition = new AuthenticateToRealmCondition(debug, coreWrapper);
}
Aggregations