API7 Docs

Get OIDC Provider by ID

GET /environments/{env_id}/oidc_providers/{oidc_provider_id}

GET /environments/{env_id}/oidc_providers/{oidc_provider_id}

Interactive request editor loads with JavaScript.

Authorization

BearerAdminToken
AuthorizationBearer <token>

Organization-scoped admin token. Read operations require a valid token, and write operations require a token with write permission.

In: header

Path Parameters

env_id*string

Environment ID that scopes the request.

Formatuuid
oidc_provider_id*string

OIDC provider ID within the environment.

Formatuuid

Response Body

application/json

application/json

application/json

application/json

curl -X GET "$AISIX_CP/environments/$ENV_ID/oidc_providers/$OIDC_PROVIDER_ID" \  -H "Authorization: Bearer $AISIX_TOKEN"

OK

{
  "oidc_provider": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "env_id": "3f917d0d-4dff-42f3-97c4-6a5455dfe8c2",
    "name": "string",
    "issuer": "string",
    "audiences": [
      "string"
    ],
    "jwks_uri": "string",
    "identity_claim": "sub",
    "required_scopes": [
      "string"
    ],
    "bound_claims": {
      "property1": "string",
      "property2": "string"
    },
    "leeway_secs": 0,
    "enabled": true,
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z"
  }
}
Complete operation details and schema variants

GET /environments/{env_id}/oidc_providers/{oidc_provider_id}

Get OIDC Provider by ID

Return one OIDC provider. The provider must belong to the environment in the request path.

Parameters

  • env_id (path, string, required): Environment ID that scopes the request.
  • oidc_provider_id (path, string, required): OIDC provider ID within the environment.

Responses

  • 200: OK

  • oidc_provider (object, required): An identity provider the gateway trusts for JWT authentication. Requests presenting a JWT issued by an enabled provider run as the API key whose jwt_subject equals the token's identity claim.

  • oidc_provider.id (string, required): OIDC provider ID.

  • oidc_provider.env_id (string, required): Environment ID that owns this provider.

  • oidc_provider.name (string, required): Human-readable provider name, unique within the environment. Fixed at creation.

  • oidc_provider.issuer (string, required): Expected iss claim, compared exactly against the token's issuer. Tokens whose issuer matches no enabled provider are rejected.

  • oidc_provider.audiences (array, required): Accepted aud values. A token's audience must contain at least one of these; tokens without an audience claim are rejected.

  • oidc_provider.jwks_uri (string, optional): Endpoint the token signing keys are fetched from. When omitted, the endpoint is resolved from the issuer's OIDC discovery document (<issuer>/.well-known/openid-configuration). Signing-key rotation at the identity provider is picked up automatically.

  • oidc_provider.identity_claim (string, required): Claim whose value selects the API key to act as: the request is bound to the key whose jwt_subject equals this claim's value. Dots traverse nested objects.

  • oidc_provider.required_scopes (array, required): Scopes that must all be present in the token's scope claim (a space-delimited string or an array of strings). An empty list requires nothing.

  • oidc_provider.bound_claims (object, optional): Claim requirements a token must satisfy, all of which must hold. Keys name claims, with dots traversing nested objects (for example realm_access.roles). Each requirement is satisfied when the claim equals — or, for array claims, contains — the expected value (a single string) or at least one of the expected values (an array of strings).

  • oneOf variant 1

  • oneOf variant 2

  • oidc_provider.leeway_secs (integer, required): Clock-skew allowance in seconds applied to the token's time-based claims.

  • oidc_provider.enabled (boolean, required): Disabled providers are kept but tokens they issued no longer authenticate.

  • oidc_provider.created_at (string, required): Time when the provider was created.

  • oidc_provider.updated_at (string, required): Time when the provider was last updated.

  • 400: Request body or parameters failed validation.

  • error (object, required): Error details.

  • error.code (string, required): Machine-readable identifier. Examples: UNAUTHENTICATED, INVALID_REQUEST, MASTER_KEY_UNSET, INTERNAL.

  • error.message (string, required): Human-readable explanation; safe to surface to operators.

  • 401: Missing or invalid bearer. Response fields (application/json): identical to GET /environments/{env_id}/oidc_providers/{oidc_provider_id}, response 400 above.

  • 404: Resource not found. Response fields (application/json): identical to GET /environments/{env_id}/oidc_providers/{oidc_provider_id}, response 400 above.

cURL

curl -X GET '$AISIX_CP/environments/{env_id}/oidc_providers/{oidc_provider_id}' -H 'Authorization: Bearer $AISIX_TOKEN'