
1) Creating the API Proxy
In this scenario, a REST API named Swagger Petstore(https://petstore.swagger.io) will be used. First, this address must be defined as an API Proxy. For this, click on the API Proxies option under the Development menu.







2) JSON Web Keypair Sets
To add JSON Web Keypair Sets, go to the JSON Web Keypair Sets menu under Secret Manager from the left menu.





- Go to the JSON Web Keypair Sets page from the Secret Manager menu under the left menu.
- In this scenario, the Name field will be used as testjwk scenario.
- Select the Paste the content of the JWT option and enter the JWK in the relevant field.
- Enter the value in the Kid field in Keycloak into the Key id field and then click the Save and Deploy button to save.

3) Adding Authentication Policy
The JOSE Validation policy is now ready to use. Go to the page where API Proxies are listed and select the proxy named Swagger Petstore from here. Then go to the Develop tab and click the Add Policy button. On the opened page, select the JOSE Validation policy.


4) Testing the API Proxy
Select the proxy named Swagger Petstore. Select the endpoint named /pet/findByStatus under the Develop tab. Click on the Test Endpoint expression to test this endpoint. Enter the desired status value as pending in the URL, and when the Send button is pressed, it is seen that the returned response is an error message. Place the Authorization header in the Header and use the token information produced from Keycloak or Apinizer here. When you click the Send button, the answer received is the expression in the rectangle below on the image.

