Skip to content

Using the SDK with WireMock #1636

@thecodesmith

Description

@thecodesmith

I am building a microservice that integrates with Okta using the Okta Java SDK to retrieve user and group data. For automated testing I'd like to use WireMock to mock the Okta API endpoints so my application code can be fully exercised, without hitting Okta rate limits as well as easier setup of test data for many different scenarios. However, so far I haven't been able to find a way to configure the Okta SDK to work with my WireMock endpoints due to two issues:

  1. The Okta SDK does not accept an http:// URL and requires https://
  2. I can configure WireMock to run over HTTPS with a custom KeyStore, but have not found how I can configure the Okta SDK to trust the custom KeyStore using a TrustManager/SSLContext

I did find this comment which was promising but it appears ClientBuilder.setRequestExecutorFactory() was removed in SDK v10.0.0. Is there a comparable way to accomplish my needs in the current SDK version?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions