Generic OIDC
Generic OIDC configuration can be used with any identity provider that can issue OIDC tokens.
First, create a new configuration in emulator.wtf OIDC configurations page with
Generic OIDC as the provider. Set the Issuer URL of your OIDC provider and add
the subject patterns that are allowed to authenticate. Then copy the OIDC
configuration ID to your environment as OIDC_CONFIGURATION_ID.
Request an OIDC token from your provider for the audience set in your OIDC
configuration (api://emulator.wtf by default), store it in OIDC_TOKEN and
exchange it for an emulator.wtf API token:
EW_API_TOKEN=$(curl -sSf -H 'Content-Type: application/json' -H 'Accept: text/plain' \
-d "{\"oidcConfigurationUuid\":\"$OIDC_CONFIGURATION_ID\",\"oidcToken\":\"$OIDC_TOKEN\"}" \
https://api.emulator.wtf/auth/oidc)
export EW_API_TOKEN
After that a temporarily valid EW_API_TOKEN will be set and you’ll be able to
use ew-cli or the emulator.wtf Gradle plugin without having to explicitly set
the token.