Ai
1 Star 0 Fork 0

ryancartoon/sensu-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
provider.go 956 Bytes
一键复制 编辑 原始数据 按行查看 历史
Simon Plourde 提交于 2019-06-11 23:20 +08:00 . APId Refactoring (#3018)
package v2
import (
"context"
)
// AuthProvider represents an abstracted authentication provider
type AuthProvider interface {
// Authenticate attempts to authenticate a user with its username and password
Authenticate(ctx context.Context, username, password string) (*Claims, error)
// Refresh renews the user claims with the provider claims
Refresh(ctx context.Context, providerClaims AuthProviderClaims) (*Claims, error)
// GetObjectMeta returns the object metadata for the provider
GetObjectMeta() ObjectMeta
// Name returns the provider name (e.g. default)
Name() string
// StorePrefix gives the path prefix to this resource in the store
StorePrefix() string
// Type returns the provider type (e.g. ldap)
Type() string
// URIPath gives the path to the provider
URIPath() string
// Validate checks if the fields in the provider are valid
Validate() error
// SetNamespace sets the namespace of the resource.
SetNamespace(string)
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ryancartoon/sensu-go.git
git@gitee.com:ryancartoon/sensu-go.git
ryancartoon
sensu-go
sensu-go
v5.10.1

搜索帮助