Skip to content

Commit 8a23d58

Browse files
authored
Merge pull request DuendeArchive#175 from chrisdrobison/dev
Fixing JoseUtil aud validation to be more in line with spec
2 parents 33ffe5a + 9b18038 commit 8a23d58

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/JoseUtil.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export default class JoseUtil {
7878
return Promise.reject(new Error("Invalid issuer in token: " + payload.iss));
7979
}
8080

81-
if (payload.aud !== audience) {
81+
if (payload.aud !== audience && (Array.isArray(payload.aud) && payload.aud.indexOf(audience) === -1)) {
8282
Log.error("Invalid audience in token", payload.aud);
8383
return Promise.reject(new Error("Invalid audience in token: " + payload.aud));
8484
}

0 commit comments

Comments
 (0)