I am trying to configure an API in Azure so that it uses OAuth2 to validate calls to the API. The OAuth2 server has been set up and linked as per instructions I have found online. However, I am having trouble in checking the tokens on the API side. FOr this, I have found a tutorial online at: https://docs.microsoft.com/en-us/azure/api-management/api-management-access-restriction-policies
Here the following template is given to add to your APIs inbound checks to validate the JWT:
<validate-jwt
header-name="name of http header containing the token (use query-parameter-name attribute if the token is passed in the URL)"
failed-validation-httpcode="http status code to return on failure"
failed-validation-error-message="error message to return on failure"
require-expiration-time="true|false"
require-scheme="scheme"
require-signed-tokens="true|false"
clock-skew="allowed clock skew in seconds">
<issuer-signing-keys>
<key>base64 encoded signing key</key>
<!-- if there are multiple keys, then add additional key elements -->
</issuer-signing-keys>
<audiences>
<audience>audience string</audience>
<!-- if there are multiple possible audiences, then add additional audience elements -->
</audiences>
<issuers>
<issuer>issuer string</issuer>
<!-- if there are multiple possible issuers, then add additional issuer elements -->
</issuers>
<required-claims>
<claim name="name of the claim as it appears in the token" match="all|any" separator="separator character in a multi-valued claim">
<value>claim value as it is expected to appear in the token</value>
<!-- if there is more than one allowed values, then add additional value elements -->
</claim>
<!-- if there are multiple possible allowed values, then add additional value elements -->
</required-claims>
<openid-config url="full URL of the configuration endpoint, e.g. https://login.constoso.com/openid-configuration" />
<zumo-master-key id="key identifier">key value</zumo-master-key>
</validate-jwt>
As it is not explicitly stated anywhere, can anyone please shed light on what the key, audience, claim, and issuer values mean and where I can find this information?