Documentation
¶
Index ¶
- func AuthEventStreams(ctx context.Context) error
- func AuthListAsyncReplies(ctx context.Context) error
- func AuthRPC(ctx context.Context, method string, args ...interface{}) error
- func AuthRPCSubscribe(ctx context.Context, namespace string, channel interface{}, ...) error
- func AuthReadAsyncReplyByUUID(ctx context.Context) error
- func GetAccessToken(ctx context.Context) string
- func GetAuthContext(ctx context.Context) interface{}
- func IsSystemContext(ctx context.Context) bool
- func NewSystemAuthContext() context.Context
- func RegisterSecurityModule(sm plugins.SecurityModule)
- func WithAuthContext(ctx context.Context, token string) (context.Context, error)
- type ContextKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthEventStreams ¶
AuthEventStreams authorize the whole of event streams
func AuthListAsyncReplies ¶
AuthListAsyncReplies authorize the listing or searching of all replies
func AuthRPCSubscribe ¶
func AuthRPCSubscribe(ctx context.Context, namespace string, channel interface{}, args ...interface{}) error
AuthRPCSubscribe authorize a subscribe RPC call
func AuthReadAsyncReplyByUUID ¶
AuthReadAsyncReplyByUUID authorize the query of an invidual reply by UUID
func GetAccessToken ¶
GetAccessToken extracts a previously stored access token
func GetAuthContext ¶
GetAuthContext extracts a previously stored auth context from the context
func IsSystemContext ¶
IsSystemContext checks if a context was created as a system context
func NewSystemAuthContext ¶
NewSystemAuthContext creates a system background context
func RegisterSecurityModule ¶
func RegisterSecurityModule(sm plugins.SecurityModule)
RegisterSecurityModule is the plug point to register a security module
Types ¶
type ContextKey ¶
type ContextKey int
const ( ContextKeySystemAuth ContextKey = iota ContextKeyAuthContext ContextKeyAccessToken )
Click to show internal directories.
Click to hide internal directories.