auth

package
v0.9.20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EventStreams added in v0.9.18

func EventStreams(ctx context.Context) error

EventStreams authorize the whole of event streams

func GetAccessToken

func GetAccessToken(ctx context.Context) string

GetAccessToken extracts a previously stored access token

func GetAuthContext

func GetAuthContext(ctx context.Context) interface{}

GetAuthContext extracts a previously stored auth context from the context

func IsSystemContext

func IsSystemContext(ctx context.Context) bool

IsSystemContext checks if a context was created as a system context

func ListAsyncReplies added in v0.9.18

func ListAsyncReplies(ctx context.Context) error

ListAsyncReplies authorize the listing or searching of all replies

func NewSystemAuthContext

func NewSystemAuthContext() context.Context

NewSystemAuthContext creates a system background context

func RPC added in v0.9.18

func RPC(ctx context.Context, method string, args ...interface{}) error

RPC authorize an RPC call

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

func ReadAsyncReplyByUUID(ctx context.Context) error

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

func WithAuthContext

func WithAuthContext(ctx context.Context, token string) (context.Context, error)

WithAuthContext adds an access token to a base context

Types

type ContextKey

type ContextKey int
const (
	ContextKeySystemAuth ContextKey = iota
	ContextKeyAuthContext
	ContextKeyAccessToken
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL