mirror of
https://github.com/immich-app/immich.git
synced 2025-12-22 09:15:34 +03:00
chore: migrate oauth to repo (#13211)
This commit is contained in:
22
server/src/interfaces/oauth.interface.ts
Normal file
22
server/src/interfaces/oauth.interface.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
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>;
|
||||
}
|
||||
Reference in New Issue
Block a user