Closed dyapasrikanth closed 2 years ago
The metatype.xml says that this is attribute accepts multiple values,
<AD id="audiences" name="%audiences" description="%audiences.desc" required="false" type="String" cardinality="400" />
Therefore, config admin should have done that before passing these to the service. It will need to determined if there is an issue with config admin not parsing these properly when a variable is used.
As a workaround, please set the audiences attribute to "https://abc.com/aud1,https://abc.com/aud2".
Thanks!
You can use ${list(openid.jwt.audiences)}
as documented here: https://openliberty.io/docs/latest/reference/config/server-configuration-overview.html#variable-substitution
`Variable values are always interpreted as a string with simple type conversion. Therefore, a list of ports (such as 80,443) might be interpreted as a single string rather than as two port numbers. You can force the variable substitution to split on the , by using a list function, as shown in the following example:
`
@dyapasrikanth The issue will be closed since the variable is working as documented. Please follow @brenthdaniel 's suggestion.
Regards, Teddy
I have a requirement to accept 2 different tokens with different audiences
https://abc.com/aud1
,https://abc.com/aud2
. According the documentation I have configured openidConnectClient like belowAudience validation is failing because of below error
When I debug it,
audiences
property going as a single element array to theOidcClientConfigImpl
likenew String[]{"https://abc.com/aud1,https://abc.com/aud2"}
and it is failing at audience validationDiagnostic information: