feat(auth): implement OAuth 2.0 authorization code flow and dynamic client registration
- Add OAuth 2.0 support with authorization code flow and dynamic client registration. - Introduce new handlers for OAuth metadata, client registration, authorization, and token issuance. - Enhance authentication middleware to support OAuth client credentials. - Create in-memory stores for authorization codes and tokens. - Update configuration to include OAuth client details. - Ensure validation checks for OAuth clients in the configuration.
This commit is contained in:
@@ -14,7 +14,6 @@ mcp:
|
||||
transport: "streamable_http"
|
||||
|
||||
auth:
|
||||
mode: "api_keys"
|
||||
header_name: "x-brain-key"
|
||||
query_param: "key"
|
||||
allow_query_param: false
|
||||
@@ -22,6 +21,12 @@ auth:
|
||||
- id: "local-client"
|
||||
value: "replace-me"
|
||||
description: "main local client key"
|
||||
oauth:
|
||||
clients:
|
||||
- id: "oauth-client"
|
||||
client_id: ""
|
||||
client_secret: ""
|
||||
description: "used when auth.mode=oauth_client_credentials"
|
||||
|
||||
database:
|
||||
url: "postgres://postgres:postgres@localhost:5432/amcs?sslmode=disable"
|
||||
|
||||
Reference in New Issue
Block a user