yao/openapi/oauth/acl/interfaces.go
Max 667d40b5a1 Add ACL support to OAuth guard and error handling
- Integrated ACL (Access Control List) functionality into the OAuth guard, enabling permission checks and rate limiting based on ACL configurations.
- Updated error responses for token validation and refresh token handling to use standardized error types.
- Enhanced error handling for ACL-related issues, providing detailed HTTP responses based on specific ACL error types.
- Improved overall security and user experience by ensuring proper authorization checks are enforced during API requests.
2025-10-18 09:22:35 +08:00

12 lines
312 B
Go

package acl
import "github.com/gin-gonic/gin"
// Enforcer interface is used to enforce access control rules
type Enforcer interface {
// Enforce checks if a user has access to a resource
Enforce(c *gin.Context) (bool, error)
// Enabled returns true if the ACL is enabled, otherwise false
Enabled() bool
}