auth

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2018 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnonymousAuth

type AnonymousAuth struct {
	AuthRole string
}

func (AnonymousAuth) AuthMethod

func (self AnonymousAuth) AuthMethod() string

Use the crossbar.io "anonymous" authmethod name here.

func (AnonymousAuth) Authenticate

func (self AnonymousAuth) Authenticate(sid wamp.ID, details wamp.Dict, client wamp.Peer) (*wamp.Welcome, error)

type AuthRoles

type AuthRoles []string

type DynamicAuthorizer

type DynamicAuthorizer struct {
	PermitDefault      bool
	TrustedAuthRoles   mapset.Set
	UpstreamAuthorizer string
	Realm              string
}

func (DynamicAuthorizer) Authorize

func (self DynamicAuthorizer) Authorize(sess *wamp.Session, msg wamp.Message) (bool, error)

type DynamicTicketAuth

type DynamicTicketAuth struct {
	SharedSecretAuthenticator
	UpstreamAuthFunc string
	AllowResumeToken bool
}

func NewDynamicTicket

func NewDynamicTicket(authfunc string, authrolefunc string, realm string, invalid mapset.Set, allowtoken bool) (*DynamicTicketAuth, error)

func (*DynamicTicketAuth) Authenticate

func (self *DynamicTicketAuth) Authenticate(sid wamp.ID, details wamp.Dict, client wamp.Peer) (*wamp.Welcome, error)

type FeatureAuthorizer

type FeatureAuthorizer struct {
	PermitDefault    bool
	MatrixURI        string
	MappingURI       string
	TrustedAuthRoles mapset.Set
	FeatureMatrix    *FeatureMatrix
	FeatureMapping   *FeatureMapping
	CallCounter      int
}

func NewFeatureAuthorizer

func NewFeatureAuthorizer(permitDefault bool, matrixURI string, mappingURI string, trustedAuthRoles mapset.Set) *FeatureAuthorizer

func (*FeatureAuthorizer) Authorize

func (this *FeatureAuthorizer) Authorize(sess *wamp.Session, msg wamp.Message) (bool, error)

func (*FeatureAuthorizer) Initialize

func (this *FeatureAuthorizer) Initialize()

func (*FeatureAuthorizer) Update

func (this *FeatureAuthorizer) Update(_ context.Context, args wamp.List, _, _ wamp.Dict) *client.InvokeResult

func (*FeatureAuthorizer) UpdateMapping

func (this *FeatureAuthorizer) UpdateMapping() error

func (*FeatureAuthorizer) UpdateMatrix

func (this *FeatureAuthorizer) UpdateMatrix() error

type FeatureMapping

type FeatureMapping map[wamp.URI]wamp.URI

type FeatureMatrix

type FeatureMatrix map[wamp.URI]map[string]bool

type ResumeAuthenticator

type ResumeAuthenticator struct {
	SharedSecretAuthenticator
	// Map from token -> Token
	Tokens map[string]Token
}

func NewResumeAuthenticator

func NewResumeAuthenticator(authrolefunc string, realm string, invalidRoles mapset.Set) (*ResumeAuthenticator, error)

func (*ResumeAuthenticator) Authenticate

func (self *ResumeAuthenticator) Authenticate(sid wamp.ID, details wamp.Dict, client wamp.Peer) (*wamp.Welcome, error)

func (*ResumeAuthenticator) CreateNewToken

func (self *ResumeAuthenticator) CreateNewToken(_ context.Context, args wamp.List, _, _ wamp.Dict) *client.InvokeResult

func (*ResumeAuthenticator) Initialize

func (self *ResumeAuthenticator) Initialize()

type SharedSecretAuthenticator

type SharedSecretAuthenticator struct {
	Realm                    string
	UpstreamGetAuthRolesFunc string
	InvalidAuthRoles         mapset.Set
	AuthMethodValue          string
}

func (*SharedSecretAuthenticator) AuthMethod

func (self *SharedSecretAuthenticator) AuthMethod() string

func (*SharedSecretAuthenticator) FetchAndFilterAuthRoles

func (self *SharedSecretAuthenticator) FetchAndFilterAuthRoles(authid string) (*wamp.Welcome, error)

type TLSAuth

type TLSAuth struct {
	ValidClientCAs []cli.TLSClientCAInfo
}

func (TLSAuth) AuthMethod

func (self TLSAuth) AuthMethod() string

func (TLSAuth) Authenticate

func (self TLSAuth) Authenticate(sid wamp.ID, details wamp.Dict, client wamp.Peer) (*wamp.Welcome, error)

type Token

type Token struct {
	AuthID     string
	ExpireDate time.Time
}

Jump to

Keyboard shortcuts

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