Title:
OAuthprofile multiple Audience
Summary:
How to add multiple Audience in OAuth profile in APIPCS
Content:
Hi Team,
My Sample OAuthprofile:
<OAuth2TokenLocalEnforcerConfig>
<Name>DEFAULT</Name>
<HeaderNameIDToken>IDToken</HeaderNameIDToken>
<!-- Issuer of the token. In this case Oracle Identity Cloud -->
<Issuer>https://identity.oraclecloud.com/</Issuer>
<AudienceRestrictionFromConfig>true</AudienceRestrictionFromConfig>
<!-- Audience should match the Primary Audience in the Resource Server in IDCS -->
<Audience>SNLibraryAPI</Audience>
<MandatoryClaims></MandatoryClaims>
<!-- useFormat has 2 values PEMFormatPubKey, X509FormatPubKey -->
<PublicCertLocation useFormat='JWKFormatPubKey'>
<JWKFormatPubKey>added the signature from IDCS</JWKFormatPubKey></PublicCertLocation>
</OAuth2TokenLocalEnforcerConfig>
in the above OAuth profile, I have used Audience as "SNLibraryAPI" which is the audience I have mentioned when I configured resource application in IDCS.
Now the question is if I create another resource application in IDCS with another primary audience ex. SNMovieAPI, how I will add this is my Authprofile? can I add like <Audience>SNLibraryAPI, SNMovieAPI</Audience> or do I need to create another element of <OAuth2TokenLocalEnforcerConfig>?
Another question each <OAuth2TokenLocalEnforcerConfig> has Name element, can I create it with any name other than DEFAULT? any document which explains in detail how to use OAuth profile?
Thanks
Sreejit Nair
Version:
IDCS 18.4.2, APIPCS 18.2.3