mirror of https://github.com/usememos/memos
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Add ApplyToContext and AuthenticateToUser helpers to the auth package, then remove the duplicated auth code spread across the MCP middleware, file server, Connect interceptor, and gRPC-Gateway middleware. - auth.ApplyToContext: single place to set claims/user into context after Authenticate() - auth.AuthenticateToUser: resolves any credential (bearer token or refresh cookie) to a *store.User - MCP middleware: replaced manual PAT DB lookup + expiry check with Authenticator.AuthenticateByPAT - File server: replaced authenticateByBearerToken/authenticateByRefreshToken with AuthenticateToUser - Connect interceptor + Gateway middleware: replaced duplicated context-setting block with ApplyToContext - MCPService now accepts secret to construct its own Authenticator |
3 months ago | |
|---|---|---|
| .. | ||
| authenticator.go | 3 months ago | |
| context.go | 3 months ago | |
| extract.go | 5 months ago | |
| token.go | 5 months ago | |
| token_test.go | 4 months ago | |