Versions in this module Expand all Collapse all v0 v0.9.0 Sep 7, 2023 v0.8.0 Apr 17, 2023 Changes in this version + const TokenType + func GetUser(ctx context.Context) string + func SetUser(ctx context.Context, user string) context.Context + func StreamServerInterceptor() grpc.StreamServerInterceptor + func UnaryServerInterceptor(authFunc AuthorizationFunc) grpc.UnaryServerInterceptor + type Auth struct + Authentication authentication.Authentication + Authorization authorization.Authorization + RoleClient authorization.RoleClient + TokenClient authentication.TokenClient + func NewAuth(config Config, cluster cluster.Cluster) *Auth + func (a *Auth) Authenticate(ctx context.Context) (context.Context, error) + func (a *Auth) Authorize(ctx context.Context, method string, req interface{}) error + func (a *Auth) Disable() bool + func (a *Auth) GetRoleClient() authorization.RoleClient + func (a *Auth) OpenEventbus() bool + func (a *Auth) OpenSubscription() bool + func (a *Auth) RegisterAuthorizeFunc(method string, authorizeFunc AuthorizeFunc) + type AuthorizationFunc func(ctx context.Context, method string, req interface{}) (err error) + type AuthorizeFunc func(ctx context.Context, req interface{}) (authorization.ResourceKind, vanus.ID, authorization.Action) + type Config struct + Disable bool + OpenEventbus bool + OpenSubscription bool