mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
add jsdocs to LoginComponentService
This commit is contained in:
@@ -19,21 +19,18 @@ export class DefaultLoginComponentService implements LoginComponentService {
|
|||||||
protected ssoLoginService: SsoLoginServiceAbstraction,
|
protected ssoLoginService: SsoLoginServiceAbstraction,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
// Web
|
|
||||||
setPreviousUrl(route: UrlTree): void | null {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
async getOrgPolicies(): Promise<PasswordPolicies | null> {
|
async getOrgPolicies(): Promise<PasswordPolicies | null> {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Web/Browser
|
setPreviousUrl(route: UrlTree): void | null {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
getShowPasswordlessFlag(): boolean {
|
getShowPasswordlessFlag(): boolean {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Used on Browser and overriden on Desktop
|
|
||||||
async launchSsoBrowserWindow(
|
async launchSsoBrowserWindow(
|
||||||
email: string,
|
email: string,
|
||||||
clientId: "browser" | "desktop",
|
clientId: "browser" | "desktop",
|
||||||
|
|||||||
@@ -9,14 +9,37 @@ export interface PasswordPolicies {
|
|||||||
enforcedPasswordPolicyOptions: MasterPasswordPolicyOptions;
|
enforcedPasswordPolicyOptions: MasterPasswordPolicyOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The `LoginComponentService` allows the single libs/auth `LoginComponent` to
|
||||||
|
* delegate all client-specific functionality to client-specific service
|
||||||
|
* implementations of `LoginComponentService`.
|
||||||
|
*
|
||||||
|
* The `LoginComponentService` should not be confused with the
|
||||||
|
* `LoginStrategyService`, which is used to determine the login strategy and
|
||||||
|
* performs the core login logic.
|
||||||
|
*/
|
||||||
export abstract class LoginComponentService {
|
export abstract class LoginComponentService {
|
||||||
// Web
|
/**
|
||||||
|
* Gets the organization policies if there is an organization invite.
|
||||||
|
* - Used by: Web
|
||||||
|
*/
|
||||||
getOrgPolicies: () => Promise<PasswordPolicies | null>;
|
getOrgPolicies: () => Promise<PasswordPolicies | null>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the previous URL to keep track of in memory.
|
||||||
|
* - Used by: Web
|
||||||
|
*/
|
||||||
setPreviousUrl: (route: UrlTree) => void | null;
|
setPreviousUrl: (route: UrlTree) => void | null;
|
||||||
|
|
||||||
// Web/Browser
|
/**
|
||||||
|
* Gets the status of the `showPasswordless` feature flag.
|
||||||
|
* - Used by: Web, Browser
|
||||||
|
*/
|
||||||
getShowPasswordlessFlag: () => boolean;
|
getShowPasswordlessFlag: () => boolean;
|
||||||
|
|
||||||
// Used on Browser and overriden on Desktop
|
/**
|
||||||
|
* Launches the SSO flow in a new browser window.
|
||||||
|
* - Used by: Browser, Desktop
|
||||||
|
*/
|
||||||
launchSsoBrowserWindow: (email: string, clientId: "browser" | "desktop") => Promise<void>;
|
launchSsoBrowserWindow: (email: string, clientId: "browser" | "desktop") => Promise<void>;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user