mirror of
https://github.com/bitwarden/browser
synced 2026-01-08 03:23:50 +00:00
* Send loggedOut/locked events on logout/lock event
* Revert "Send loggedOut/locked events on logout/lock event"
This reverts commit 293f2d6131.
* Ensure loggedOut is sent for non-active user logouts too
* Make loggedOut accept userIds
* Add userBeingLoggedOut in desktop app component
* Await updateconnection calls
21 lines
971 B
TypeScript
21 lines
971 B
TypeScript
import { Observable } from "rxjs";
|
|
|
|
import { UserId } from "../../types/guid";
|
|
import { AuthenticationStatus } from "../enums/authentication-status";
|
|
|
|
export abstract class AuthService {
|
|
/** Authentication status for the active user */
|
|
abstract activeAccountStatus$: Observable<AuthenticationStatus>;
|
|
/** Authentication status for all known users */
|
|
abstract authStatuses$: Observable<Record<UserId, AuthenticationStatus>>;
|
|
/**
|
|
* Returns an observable authentication status for the given user id.
|
|
* @note userId is a required parameter, null values will always return `AuthenticationStatus.LoggedOut`
|
|
* @param userId The user id to check for an access token.
|
|
*/
|
|
abstract authStatusFor$(userId: UserId): Observable<AuthenticationStatus>;
|
|
/** @deprecated use {@link activeAccountStatus$} instead */
|
|
abstract getAuthStatus: (userId?: string) => Promise<AuthenticationStatus>;
|
|
abstract logOut: (callback: () => void, userId?: string) => void;
|
|
}
|