mirror of
https://github.com/swissmakers/swiss-datashare.git
synced 2026-04-21 06:03:13 +02:00
22 lines
702 B
TypeScript
22 lines
702 B
TypeScript
|
|
import { GenericOidcProvider } from "./genericOidc.provider";
|
||
|
|
import { ConfigService } from "../../config/config.service";
|
||
|
|
import { JwtService } from "@nestjs/jwt";
|
||
|
|
import { Inject, Injectable } from "@nestjs/common";
|
||
|
|
import { CACHE_MANAGER } from "@nestjs/cache-manager";
|
||
|
|
import { Cache } from "cache-manager";
|
||
|
|
|
||
|
|
@Injectable()
|
||
|
|
export class GoogleProvider extends GenericOidcProvider {
|
||
|
|
constructor(
|
||
|
|
config: ConfigService,
|
||
|
|
jwtService: JwtService,
|
||
|
|
@Inject(CACHE_MANAGER) cache: Cache,
|
||
|
|
) {
|
||
|
|
super("google", ["oauth.google-enabled"], config, jwtService, cache);
|
||
|
|
}
|
||
|
|
|
||
|
|
protected getDiscoveryUri(): string {
|
||
|
|
return "https://accounts.google.com/.well-known/openid-configuration";
|
||
|
|
}
|
||
|
|
}
|