Skip to main content

Edge Route OIDC Module

Replace HTTPS Edge Route OIDC Module

Request

PUT /edges/https/{edge_id}/routes/{id}/oidc

Example Request

curl \
-X PUT \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-H "Ngrok-Version: 2" \
-d '{"client_id":"some-client-id","client_secret":"some-client-secret","enabled":true,"issuer":"https://accounts.google.com","scopes":["profile"]}' \
https://api.ngrok.com/edges/https/edghts_2gsqMVFxloZLgJj58B3a6FXlfnm/routes/edghtsrt_2gsqMWaFg0yVM5i0WT1EoufnRX9/oidc

Parameters

NameTypeDescription
enabledbooleantrue if the module will be applied to traffic, false to disable. default true if unspecified
options_passthroughbooleanDo not enforce authentication on HTTP OPTIONS requests. necessary if you are supporting CORS.
cookie_prefixstringthe prefix of the session cookie that ngrok sets on the http client to cache authentication. default is 'ngrok.'
inactivity_timeoutuint32Integer number of seconds of inactivity after which if the user has not accessed the endpoint, their session will time out and they will be forced to reauthenticate.
maximum_durationuint32Integer number of seconds of the maximum duration of an authenticated session. After this period is exceeded, a user must reauthenticate.
issuerstringURL of the OIDC "OpenID provider". This is the base URL used for discovery.
client_idstringThe OIDC app's client ID and OIDC audience.
client_secretstringThe OIDC app's client secret.
scopesList<string>The set of scopes to request from the OIDC identity provider.

Response

Returns a 200 response on success

Example Response

{
"client_id": "some-client-id",
"client_secret": "some-client-secret",
"cookie_prefix": "",
"enabled": true,
"inactivity_timeout": 0,
"issuer": "https://accounts.google.com",
"maximum_duration": 0,
"options_passthrough": false,
"scopes": ["profile"]
}

Fields

NameTypeDescription
enabledbooleantrue if the module will be applied to traffic, false to disable. default true if unspecified
options_passthroughbooleanDo not enforce authentication on HTTP OPTIONS requests. necessary if you are supporting CORS.
cookie_prefixstringthe prefix of the session cookie that ngrok sets on the http client to cache authentication. default is 'ngrok.'
inactivity_timeoutuint32Integer number of seconds of inactivity after which if the user has not accessed the endpoint, their session will time out and they will be forced to reauthenticate.
maximum_durationuint32Integer number of seconds of the maximum duration of an authenticated session. After this period is exceeded, a user must reauthenticate.
issuerstringURL of the OIDC "OpenID provider". This is the base URL used for discovery.
client_idstringThe OIDC app's client ID and OIDC audience.
client_secretstringThe OIDC app's client secret.
scopesList<string>The set of scopes to request from the OIDC identity provider.

Get HTTPS Edge Route OIDC Module

Request

GET /edges/https/{edge_id}/routes/{id}/oidc

Example Request

curl \
-X GET \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/edges/https/edghts_2gsqMVFxloZLgJj58B3a6FXlfnm/routes/edghtsrt_2gsqMWaFg0yVM5i0WT1EoufnRX9/oidc

Response

Returns a 200 response on success

Example Response

{
"client_id": "some-client-id",
"client_secret": "some-client-secret",
"cookie_prefix": "",
"enabled": true,
"inactivity_timeout": 0,
"issuer": "https://accounts.google.com",
"maximum_duration": 0,
"options_passthrough": false,
"scopes": ["profile"]
}

Fields

NameTypeDescription
enabledbooleantrue if the module will be applied to traffic, false to disable. default true if unspecified
options_passthroughbooleanDo not enforce authentication on HTTP OPTIONS requests. necessary if you are supporting CORS.
cookie_prefixstringthe prefix of the session cookie that ngrok sets on the http client to cache authentication. default is 'ngrok.'
inactivity_timeoutuint32Integer number of seconds of inactivity after which if the user has not accessed the endpoint, their session will time out and they will be forced to reauthenticate.
maximum_durationuint32Integer number of seconds of the maximum duration of an authenticated session. After this period is exceeded, a user must reauthenticate.
issuerstringURL of the OIDC "OpenID provider". This is the base URL used for discovery.
client_idstringThe OIDC app's client ID and OIDC audience.
client_secretstringThe OIDC app's client secret.
scopesList<string>The set of scopes to request from the OIDC identity provider.

Delete HTTPS Edge Route OIDC Module

Request

DELETE /edges/https/{edge_id}/routes/{id}/oidc

Example Request

curl \
-X DELETE \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/edges/https/edghts_2gsqMVFxloZLgJj58B3a6FXlfnm/routes/edghtsrt_2gsqMWaFg0yVM5i0WT1EoufnRX9/oidc

Response

Returns a 204 response with no body on success