Documentation
¶
Index ¶
- func AuthenticationMiddleware(next http.Handler) http.Handler
- func GetClient(ctx context.Context) *client.DescopeClient
- func NewContextWithToken(ctx context.Context, token *Token) context.Context
- func WithSDKMiddleware(descopeClient *client.DescopeClient, next http.Handler) http.HandlerFunc
- type DescopeConfig
- type DescopeLogger
- type Permission
- type Token
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewContextWithToken ¶
func WithSDKMiddleware ¶
func WithSDKMiddleware(descopeClient *client.DescopeClient, next http.Handler) http.HandlerFunc
Types ¶
type DescopeConfig ¶
type DescopeConfig struct { DescopeLogLevel string `required:"true"` DescopeProjectID string `required:"true"` DescopeManagementKeyToken string `required:"true"` DescopeBackendAccessKeyToken string `required:"true"` }
func (*DescopeConfig) NewSDK ¶
func (c *DescopeConfig) NewSDK(ctx context.Context) (*client.DescopeClient, error)
type DescopeLogger ¶
func (*DescopeLogger) Print ¶
func (l *DescopeLogger) Print(v ...interface{})
type Permission ¶
type Permission string
func NewPermission ¶
func NewPermission(scope, action string) Permission
type Token ¶
func (*Token) GetTenants ¶
func (*Token) IsPermittedForTenant ¶
func (t *Token) IsPermittedForTenant(tenant string, permissions ...Permission) bool
func (*Token) IsPermittedGlobally ¶
func (t *Token) IsPermittedGlobally(permissions ...Permission) bool
Click to show internal directories.
Click to hide internal directories.