feat: 添加JWKS管理功能,支持基于用户token创建新token
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { OAuth, RedisTokenStore } from './oauth.ts';
|
||||
import { useContextKey } from '@kevisual/context';
|
||||
import { Redis } from 'ioredis';
|
||||
import { manager } from '../models/jwks-manager.ts';
|
||||
|
||||
export const oauth = useContextKey('oauth', () => {
|
||||
const redis = useContextKey<Redis>('redis');
|
||||
@@ -16,3 +17,7 @@ export const oauth = useContextKey('oauth', () => {
|
||||
const oauth = new OAuth(store);
|
||||
return oauth;
|
||||
});
|
||||
|
||||
export const jwksManager = useContextKey('jwksManager', () => manager);
|
||||
|
||||
await manager.init()
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
export * from './oauth.ts';
|
||||
export * from './salt.ts';
|
||||
export * from './salt.ts';
|
||||
export * from './auth.ts';
|
||||
Reference in New Issue
Block a user