mirror of
https://github.com/apricote/Listory.git
synced 2026-01-13 21:21:02 +00:00
feat(api): API tokens for authentication
Create and managed simple API tokens for access to the API from external tools.
This commit is contained in:
parent
eda89716ef
commit
8f7eebb806
15 changed files with 614 additions and 154 deletions
|
|
@ -2,7 +2,10 @@ import { AuthGuard } from "@nestjs/passport";
|
|||
import { AuthStrategy } from "../strategies/strategies.enum";
|
||||
|
||||
// Internal
|
||||
export const AccessTokenAuthGuard = AuthGuard(AuthStrategy.AccessToken);
|
||||
export const ApiAuthGuard = AuthGuard([
|
||||
AuthStrategy.AccessToken,
|
||||
AuthStrategy.ApiToken,
|
||||
]);
|
||||
export const RefreshTokenAuthGuard = AuthGuard(AuthStrategy.RefreshToken);
|
||||
|
||||
// Auth Provider
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue