use of com.okta.oidc.util.HttpClientFactory in project okta-oidc-android by okta.
the class RefreshTokenRequestTest method setUp.
@Before
public void setUp() throws Exception {
mEndPoint = new MockEndPoint();
String url = mEndPoint.getUrl();
mConfig = TestValues.getConfigWithUrl(url);
mTokenResponse = TokenResponse.RESTORE.restore(TOKEN_RESPONSE);
mProviderConfig = TestValues.getProviderConfiguration(url);
mRequest = TestValues.getRefreshRequest(mConfig, mTokenResponse, mProviderConfig);
mClientFactory = new HttpClientFactory();
mClientFactory.setClientType(mClientType);
mHttpClient = mClientFactory.build();
}
use of com.okta.oidc.util.HttpClientFactory 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();
}
Aggregations