edge/pkg/module/auth/testdata/auth.js

9 lines
195 B
JavaScript
Raw Normal View History

2023-02-21 12:14:29 +01:00
function testAuth(ctx) {
var subject = auth.getClaim(ctx, auth.CLAIM_SUBJECT);
2023-02-21 12:14:29 +01:00
if (subject !== "jdoe") {
throw new Error("subject: expected 'jdoe', got '"+subject+"'");
}
}