All of the mid-session and step-up auth work
This commit is contained in:
parent
1f31e0f1f8
commit
562bdd00f1
1 changed files with 11437 additions and 1212 deletions
36
clients/tui/src/utils/tuiOAuth.ts
Normal file
36
clients/tui/src/utils/tuiOAuth.ts
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
import type { AuthChallenge } from "@inspector/core/auth/challenge.js";
|
||||
import {
|
||||
isStandardOAuthStepUp as isCoreStandardOAuthStepUp,
|
||||
isStepUpConfirmation as isCoreStepUpConfirmation,
|
||||
stepUpConfirmMessage,
|
||||
stepUpInsufficientScopeMessage,
|
||||
} from "@inspector/core/auth/oauthUx.js";
|
||||
import type { InspectorServerSettings } from "@inspector/core/mcp/types.js";
|
||||
|
||||
export { stepUpConfirmMessage, stepUpInsufficientScopeMessage };
|
||||
|
||||
export {
|
||||
stepUpAuthorizeActionLabel,
|
||||
stepUpFollowUpMessage,
|
||||
stepUpModalTitle,
|
||||
} from "@inspector/core/auth/oauthUx.js";
|
||||
|
||||
/** Standard-OAuth step-up (not EMA silent re-mint). */
|
||||
export function isStandardOAuthStepUp(
|
||||
challenge: AuthChallenge,
|
||||
settings?: InspectorServerSettings,
|
||||
): boolean {
|
||||
return isCoreStandardOAuthStepUp(challenge, {
|
||||
enterpriseManaged: settings?.enterpriseManaged,
|
||||
});
|
||||
}
|
||||
|
||||
/** Standard or EMA step-up that requires in-app confirmation before OAuth. */
|
||||
export function isStepUpConfirmation(
|
||||
challenge: AuthChallenge,
|
||||
settings?: InspectorServerSettings,
|
||||
): boolean {
|
||||
return isCoreStepUpConfirmation(challenge, {
|
||||
enterpriseManaged: settings?.enterpriseManaged,
|
||||
});
|
||||
}
|
||||
Loading…
Reference in a new issue