[auth] Scenarios for scope selection (#36)
* wip scope change * rm useless bool * fix-me: package changes for linking * negative test * negative test for multiple scopes * fix displays of warnings * wip step-up * negative test for step up auth * move warning into main request flow * clean up more checks * cleanup step-up scenario * cleanup and simplify * cleanup middleware * inline negative tests * inline the other test * refactor logging and inlining for standalone execution too * skip pending tests
This commit is contained in:
parent
253ede03ad
commit
5c151133bb
1 changed files with 1074 additions and 186 deletions
|
|
@ -59,17 +59,21 @@ export function printServerResults(
|
|||
passed: number;
|
||||
failed: number;
|
||||
denominator: number;
|
||||
warnings: number;
|
||||
} {
|
||||
const denominator = checks.filter(
|
||||
(c) => c.status === 'SUCCESS' || c.status === 'FAILURE'
|
||||
).length;
|
||||
const passed = checks.filter((c) => c.status === 'SUCCESS').length;
|
||||
const failed = checks.filter((c) => c.status === 'FAILURE').length;
|
||||
const warnings = checks.filter((c) => c.status === 'WARNING').length;
|
||||
|
||||
console.log(`Checks:\n${JSON.stringify(checks, null, 2)}`);
|
||||
|
||||
console.log(`\nTest Results:`);
|
||||
console.log(`Passed: ${passed}/${denominator}, ${failed} failed`);
|
||||
console.log(
|
||||
`Passed: ${passed}/${denominator}, ${failed} failed, ${warnings} warnings`
|
||||
);
|
||||
|
||||
if (failed > 0) {
|
||||
console.log('\n=== Failed Checks ===');
|
||||
|
|
@ -84,7 +88,7 @@ export function printServerResults(
|
|||
});
|
||||
}
|
||||
|
||||
return { passed, failed, denominator };
|
||||
return { passed, failed, denominator, warnings };
|
||||
}
|
||||
|
||||
export function printServerSummary(
|
||||
|
|
|
|||
Loading…
Reference in a new issue