Search in sources :

Example 6 with OIDCConfig

use of com.okta.oidc.OIDCConfig in project okta-oidc-android by okta.

the class NativeAuthorizeRequestTest method setUp.

@Before
public void setUp() throws Exception {
    mEndPoint = new MockEndPoint();
    String url = mEndPoint.getUrl();
    OIDCConfig config = TestValues.getConfigWithUrl(url);
    mProviderConfig = getProviderConfiguration(url);
    mRequest = TestValues.getNativeLogInRequest(config, SESSION_TOKEN, mProviderConfig);
    mClientFactory = new HttpClientFactory();
    mClientFactory.setClientType(mClientType);
    mHttpClient = mClientFactory.build();
}
Also used : MockEndPoint(com.okta.oidc.util.MockEndPoint) OIDCConfig(com.okta.oidc.OIDCConfig) HttpClientFactory(com.okta.oidc.util.HttpClientFactory) Before(org.junit.Before)

Example 7 with OIDCConfig

use of com.okta.oidc.OIDCConfig in project okta-oidc-android by okta.

the class AuthorizedRequestTest method setUp.

@Before
public void setUp() throws Exception {
    mEndPoint = new MockEndPoint();
    String url = mEndPoint.getUrl();
    OIDCConfig config = TestValues.getConfigWithUrl(url);
    mProviderConfig = TestValues.getProviderConfiguration(url);
    mTokenResponse = new Gson().fromJson(JsonStrings.TOKEN_RESPONSE, TokenResponse.class);
    mClientFactory = new HttpClientFactory();
    mClientFactory.setClientType(mClientType);
    mHttpClient = mClientFactory.build();
    mRequest = HttpRequestBuilder.newAuthorizedRequest().uri(Uri.parse(mEndPoint.getUrl())).httpRequestMethod(ConnectionParameters.RequestMethod.POST).config(config).providerConfiguration(mProviderConfig).tokenResponse(mTokenResponse).createRequest();
}
Also used : TokenResponse(com.okta.oidc.net.response.TokenResponse) MockEndPoint(com.okta.oidc.util.MockEndPoint) OIDCConfig(com.okta.oidc.OIDCConfig) Gson(com.google.gson.Gson) HttpClientFactory(com.okta.oidc.util.HttpClientFactory) Before(org.junit.Before)

Aggregations

OIDCConfig (com.okta.oidc.OIDCConfig)7 MockEndPoint (com.okta.oidc.util.MockEndPoint)6 Before (org.junit.Before)6 HttpClientFactory (com.okta.oidc.util.HttpClientFactory)5 Gson (com.google.gson.Gson)2 TokenResponse (com.okta.oidc.net.response.TokenResponse)2 SyncWebAuthClient (com.okta.oidc.clients.web.SyncWebAuthClient)1 AuthorizedRequest (com.okta.oidc.net.request.AuthorizedRequest)1 ProviderConfiguration (com.okta.oidc.net.request.ProviderConfiguration)1 SharedPreferenceStorage (com.okta.oidc.storage.SharedPreferenceStorage)1 EncryptionManagerStub (com.okta.oidc.util.EncryptionManagerStub)1 Test (org.junit.Test)1