mirror of
https://github.com/wso2/open-mcp-auth-proxy.git
synced 2025-06-30 10:20:14 +00:00
Update MCP proxy to adhere to the latest draft of MCP specification
This commit is contained in:
parent
9c2d37e2df
commit
85e5fe1c1d
7 changed files with 191 additions and 41 deletions
19
internal/authz/policy.go
Normal file
19
internal/authz/policy.go
Normal file
|
@ -0,0 +1,19 @@
|
|||
package authz
|
||||
|
||||
import "net/http"
|
||||
|
||||
type Decision int
|
||||
|
||||
const (
|
||||
DecisionAllow Decision = iota
|
||||
DecisionDeny
|
||||
)
|
||||
|
||||
type PolicyResult struct {
|
||||
Decision Decision
|
||||
Message string
|
||||
}
|
||||
|
||||
type PolicyEngine interface {
|
||||
Evaluate(r *http.Request, claims *TokenClaims, requiredScope string) PolicyResult
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue