mirror of
https://github.com/samsonjs/immich.git
synced 2026-03-27 09:35:51 +00:00
22 lines
678 B
TypeScript
22 lines
678 B
TypeScript
import { UserinfoResponse } from 'openid-client';
|
|
|
|
export const IOAuthRepository = 'IOAuthRepository';
|
|
|
|
export type OAuthConfig = {
|
|
clientId: string;
|
|
clientSecret: string;
|
|
issuerUrl: string;
|
|
mobileOverrideEnabled: boolean;
|
|
mobileRedirectUri: string;
|
|
profileSigningAlgorithm: string;
|
|
scope: string;
|
|
signingAlgorithm: string;
|
|
};
|
|
export type OAuthProfile = UserinfoResponse;
|
|
|
|
export interface IOAuthRepository {
|
|
init(): void;
|
|
authorize(config: OAuthConfig, redirectUrl: string): Promise<string>;
|
|
getLogoutEndpoint(config: OAuthConfig): Promise<string | undefined>;
|
|
getProfile(config: OAuthConfig, url: string, redirectUrl: string): Promise<OAuthProfile>;
|
|
}
|