mirror of
https://github.com/apricote/Listory.git
synced 2026-01-13 21:21:02 +00:00
Create and managed simple API tokens for access to the API from external tools.
12 lines
376 B
TypeScript
12 lines
376 B
TypeScript
import { AuthGuard } from "@nestjs/passport";
|
|
import { AuthStrategy } from "../strategies/strategies.enum";
|
|
|
|
// Internal
|
|
export const ApiAuthGuard = AuthGuard([
|
|
AuthStrategy.AccessToken,
|
|
AuthStrategy.ApiToken,
|
|
]);
|
|
export const RefreshTokenAuthGuard = AuthGuard(AuthStrategy.RefreshToken);
|
|
|
|
// Auth Provider
|
|
export const SpotifyAuthGuard = AuthGuard(AuthStrategy.Spotify);
|