mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +00:00
* use deep linked url for org invite instead of separate state * remove organization invite state & fix tests * clear login redirect for SSO JIT users since they are accepted when setting MP * create accept org invite service and consolidate components in module * finish switch to accept org invite service * move logic to accept org service * the rest of the owl * clear org invite along with deep linked route * pr feedback * fix test and add error to catch null invite * pr feedback * clear stored invite if it doesn't match provided one
33 lines
1.2 KiB
TypeScript
33 lines
1.2 KiB
TypeScript
import { UserKey } from "../../types/key";
|
|
|
|
export abstract class PasswordResetEnrollmentServiceAbstraction {
|
|
/*
|
|
* Checks the user's enrollment status and enrolls them if required
|
|
* NOTE: Will also enroll the user in the organization if in the
|
|
* invited status
|
|
*/
|
|
abstract enrollIfRequired(organizationSsoIdentifier: string): Promise<void>;
|
|
|
|
/**
|
|
* Enroll current user in password reset
|
|
* NOTE: Will also enroll the user in the organization if in the
|
|
* invited status
|
|
* @param organizationId - Organization in which to enroll the user
|
|
* @returns Promise that resolves when the user is enrolled
|
|
* @throws Error if the action fails
|
|
*/
|
|
abstract enroll(organizationId: string): Promise<void>;
|
|
|
|
/**
|
|
* Enroll user in password reset
|
|
* NOTE: Will also enroll the user in the organization if in the
|
|
* invited status
|
|
* @param organizationId - Organization in which to enroll the user
|
|
* @param userId - User to enroll
|
|
* @param userKey - User's symmetric key
|
|
* @returns Promise that resolves when the user is enrolled
|
|
* @throws Error if the action fails
|
|
*/
|
|
abstract enroll(organizationId: string, userId: string, userKey: UserKey): Promise<void>;
|
|
}
|