use of com.okta.oidc.util.EncryptionManagerStub in project okta-oidc-android by okta.
the class SyncWebAuthClientTest method setUp.
@Before
public void setUp() throws Exception {
mContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
mEndPoint = new MockEndPoint();
String url = mEndPoint.getUrl();
mClientFactory = new HttpClientFactory();
mClientFactory.setClientType(mClientType);
mHttpClient = mClientFactory.build();
mConfig = TestValues.getConfigWithUrl(url);
mStorage = new SharedPreferenceStorage(mContext);
mGson = new Gson();
mProviderConfig = TestValues.getProviderConfiguration(url);
mTokenResponse = TokenResponse.RESTORE.restore(TOKEN_RESPONSE);
SyncWebAuthClient okta = new Okta.SyncWebAuthBuilder().withConfig(mConfig).withOktaHttpClient(mHttpClient).withContext(mContext).withStorage(mStorage).withEncryptionManager(new EncryptionManagerStub()).create();
mSyncWebAuth = (SyncWebAuthClientImpl) okta;
mOktaState = mSyncWebAuth.getOktaState();
mOktaState.save(mProviderConfig);
}
use of com.okta.oidc.util.EncryptionManagerStub in project okta-oidc-android by okta.
the class SessionClientImplTest method setUp.
@Before
public void setUp() throws Exception {
mContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
mEndPoint = new MockEndPoint();
mGson = new Gson();
mStorage = new SharedPreferenceStorage(mContext);
String url = mEndPoint.getUrl();
mClientFactory = new HttpClientFactory();
mClientFactory.setClientType(mClientType);
mConfig = TestValues.getConfigWithUrl(url);
mProviderConfig = TestValues.getProviderConfiguration(url);
mTokenResponse = TokenResponse.RESTORE.restore(TOKEN_RESPONSE);
WebAuthClient okta = new Okta.WebAuthBuilder().withCallbackExecutor(mExecutor).withConfig(mConfig).withOktaHttpClient(mClientFactory.build()).withContext(mContext).withStorage(mStorage).withEncryptionManager(new EncryptionManagerStub()).create();
mSessionClient = okta.getSessionClient();
OktaState mOktaState = new OktaState(new OktaRepository(mStorage, mContext, new EncryptionManagerStub(), false, false));
mOktaState.save(mTokenResponse);
mOktaState.save(mProviderConfig);
}
use of com.okta.oidc.util.EncryptionManagerStub in project okta-oidc-android by okta.
the class OktaTest method setUp.
@Before
public void setUp() throws Exception {
mContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
mStorage = new SharedPreferenceStorage(mContext);
mHttpClient = new HttpClientImpl();
mEncryptionManager = new EncryptionManagerStub();
String url = new MockEndPoint().getUrl();
mConfig = TestValues.getConfigWithUrl(url);
tabColor = Color.BLACK;
supportBrowsers = new String[] { "" };
}
use of com.okta.oidc.util.EncryptionManagerStub in project okta-oidc-android by okta.
the class OktaStateTest method setUp.
@Before
public void setUp() throws Exception {
mContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
mOktaStorageMock = new OktaStorageMock(mContext, false);
mOktaRepository = new OktaRepository(mOktaStorageMock, mContext, new EncryptionManagerStub(), false, false);
mOktaState = new OktaState(mOktaRepository);
}
use of com.okta.oidc.util.EncryptionManagerStub in project okta-oidc-android by okta.
the class OktaRepositoryTest method setUp.
@Before
public void setUp() throws Exception {
mContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
mHardwareEncryption = new EncryptionManagerStub(true);
mSoftwareEncryption = new EncryptionManagerStub(false);
mOktaStorageSoftware = new OktaStorageMock(mContext, PREF_NAME_SOFTWARE, false);
mOktaStorageHardware = new OktaStorageMock(mContext, PREF_NAME_HARDWARE, true);
}
Aggregations