use of com.okta.oidc.storage.OktaRepository 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.storage.OktaRepository 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);
}
Aggregations