Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthorizationMiddleware ¶
func AuthorizationMiddleware(opts *options.Options, inner vk.HandlerFunc) vk.HandlerFunc
func ExtractAccessToken ¶
func ExtractAccessToken(header http.Header) system.Credential
func NewAccessToken ¶
func NewAccessToken(token string) system.Credential
Types ¶
type AccessToken ¶
type AccessToken struct {
// contains filtered or unexported fields
}
func (AccessToken) Scheme ¶
func (a AccessToken) Scheme() string
func (AccessToken) String ¶
func (a AccessToken) String() string
func (AccessToken) Value ¶
func (a AccessToken) Value() string
type AuthorizationCache ¶
type AuthorizationCache struct {
// contains filtered or unexported fields
}
AuthorizationCache caches authorization successful policy decisions for up to 10 minutes.
func NewAuthorizationCache ¶
func NewAuthorizationCache(ttl time.Duration) *AuthorizationCache
NewAuthorizationCache creates a new AuthorizationCache
func (AuthorizationCache) Get ¶
func (cache AuthorizationCache) Get(key string, newFunc func() (*TenantInfo, error)) (*TenantInfo, error)
Get fetches a cached result if present; otherwise it executes newFunc to obtain the result.
type AuthzClient ¶
type AuthzClient struct {
// contains filtered or unexported fields
}
func NewApiAuthClient ¶
func NewApiAuthClient(opts *options.Options) *AuthzClient
func (*AuthzClient) Authorize ¶
func (client *AuthzClient) Authorize(token system.Credential, identifier, namespace, name string) (*TenantInfo, error)
Click to show internal directories.
Click to hide internal directories.