mirror of
https://github.com/immich-app/immich.git
synced 2026-03-06 10:07:48 +03:00
refactor: repositories (#15561)
* refactor: version history repository * refactor: oauth repository * refactor: trash repository * refactor: telemetry repository * refactor: metadata repository * refactor: cron repository * refactor: map repository * refactor: server-info repository * refactor: album user repository * refactor: notification repository
This commit is contained in:
@@ -1,10 +1,21 @@
|
||||
import { Injectable, InternalServerErrorException } from '@nestjs/common';
|
||||
import { custom, generators, Issuer } from 'openid-client';
|
||||
import { IOAuthRepository, OAuthConfig, OAuthProfile } from 'src/interfaces/oauth.interface';
|
||||
import { custom, generators, Issuer, UserinfoResponse } from 'openid-client';
|
||||
import { LoggingRepository } from 'src/repositories/logging.repository';
|
||||
|
||||
export type OAuthConfig = {
|
||||
clientId: string;
|
||||
clientSecret: string;
|
||||
issuerUrl: string;
|
||||
mobileOverrideEnabled: boolean;
|
||||
mobileRedirectUri: string;
|
||||
profileSigningAlgorithm: string;
|
||||
scope: string;
|
||||
signingAlgorithm: string;
|
||||
};
|
||||
export type OAuthProfile = UserinfoResponse;
|
||||
|
||||
@Injectable()
|
||||
export class OAuthRepository implements IOAuthRepository {
|
||||
export class OAuthRepository {
|
||||
constructor(private logger: LoggingRepository) {
|
||||
this.logger.setContext(OAuthRepository.name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user