I am using Tyk Community Edition. I want to create a flow where users attempting to access my API without a token will be redirected to Keycloak for authentication. Then, Keycloak redirects them back to Tyk with a token that Tyk validates, granting them access to the API. I have found multiple tutorials, but they all use OpenID Playground to trigger the authentication flow, redirecting to Keycloak for authentication. Then, they obtain a code, exchange it for a token, and use that token in Tyk to access the API. However, this flow isn’t desired in my case. Here is a part of my API definition.:
“”"
“use_openid”: true,
“openid_options”: {
“providers”: [
{
“issuer”: “/realms/my-realm",
“client_ids”: {
“a2V5Y2xvYWstand0”: “samira”
}
}
],
“segregate_by_client”: true
},
“proxy”: {
“listen_path”: “/test-api/”,
“target_url”: “****:6070/todos”,
“strip_listen_path”: true
},
“”"
I tested the flow in the tutorials with OpenID Playground, and it works fine with this configuration.