Documentation ¶
Index ¶
Constants ¶
View Source
const ( ApiGwJWTKey = "X-Bkapi-JWT" BcsUserTokenKey = "X-Bcs-User-Token" )
View Source
const ( SubRoot = "/bcs/services/auth" TokenPath = SubRoot + "/token" KeyPath = SubRoot + "/key" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ApiGwData ¶
type ApiGwData struct { ISS string `json:"iss"` App ApiGwDataApp `json:"app"` Project ApiGwDataProject `json:"project"` User ApiGwDataUser `json:"user"` Exp float64 `json:"exp"` NBF float64 `json:"nbf"` }
type ApiGwDataApp ¶
type ApiGwDataProject ¶
type ApiGwDataUser ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
Auth manage the authority check with bk-iam,
type QueryParam ¶
type QueryParam struct { PrincipalType string `json:"principal_type"` PrincipalID string `json:"principal_id"` ScopeType string `json:"scope_type"` ScopeID string `json:"scope_id"` ActionID auth.Action `json:"action_id"` ResourceType string `json:"resource_type"` ResourceID string `json:"resource_id"` }
func (*QueryParam) ParseResource ¶
func (qp *QueryParam) ParseResource(resource auth.Resource)
type TokenCache ¶
type TokenCache struct {
// contains filtered or unexported fields
}
func NewTokenCache ¶
func NewTokenCache(conf *config.ApiServConfig) (*TokenCache, error)
func (*TokenCache) Update ¶
func (tc *TokenCache) Update(token *auth.Token)
Click to show internal directories.
Click to hide internal directories.