18 lines
622 B
TypeScript
18 lines
622 B
TypeScript
import type { AuthenticatedUserDTO } from '@gridpilot/identity/application/dto/AuthenticatedUserDTO';
|
|
import type { AuthSessionDTO } from '@gridpilot/identity/application/dto/AuthSessionDTO';
|
|
|
|
export type AuthUser = AuthenticatedUserDTO;
|
|
export type AuthSession = AuthSessionDTO;
|
|
|
|
export interface AuthService {
|
|
getCurrentSession(): Promise<AuthSession | null>;
|
|
startIracingAuthRedirect(
|
|
returnTo?: string,
|
|
): Promise<{ redirectUrl: string; state: string }>;
|
|
loginWithIracingCallback(params: {
|
|
code: string;
|
|
state: string;
|
|
returnTo?: string;
|
|
}): Promise<AuthSession>;
|
|
logout(): Promise<void>;
|
|
} |