yes, I was correct,. it is expecting the baseUrl
Method ValidateAudience() As %Boolean [ Private ]
{
Set JWTAudience = ..%TokenObject.aud
If JWTAudience'="" {
Set matched = 0
Set currentAud = $$formatAud(..%BaseURL)
If '$IsObject(JWTAudience) {
// Compare single audience from JWT.
If $$formatAud(JWTAudience)=currentAud {
Set matched = 1
}
} Else {
// Compare multiple audience from JWT. In this case it is a %DynamicArray.
For i = 0:1:JWTAudience.%Size()-1 {
If $$formatAud(JWTAudience.%Get(i))=currentAud {
Set matched = 1
Quit
}
}
}- Log in to post comments