Documentation ¶
Index ¶
- func EventStreams(ctx context.Context) error
- func GetAccessToken(ctx context.Context) string
- func GetAuthContext(ctx context.Context) interface{}
- func IsSystemContext(ctx context.Context) bool
- func ListAsyncReplies(ctx context.Context) error
- func NewSystemAuthContext() context.Context
- func RPC(ctx context.Context, method string, args ...interface{}) error
- func RPCSubscribe(ctx context.Context, namespace string, channel interface{}, ...) error
- func ReadAsyncReplyByUUID(ctx context.Context) error
- 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 EventStreams ¶ added in v0.9.18
EventStreams authorize the whole of event streams
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 ListAsyncReplies ¶ added in v0.9.18
ListAsyncReplies authorize the listing or searching of all replies
func NewSystemAuthContext ¶
NewSystemAuthContext creates a system background context
func RPCSubscribe ¶ added in v0.9.18
func RPCSubscribe(ctx context.Context, namespace string, channel interface{}, args ...interface{}) error
RPCSubscribe authorize a subscribe RPC call
func ReadAsyncReplyByUUID ¶ added in v0.9.18
ReadAsyncReplyByUUID authorize the query of an invidual reply by UUID
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.