authentication

package
v0.0.0-...-ee7bdce Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const AggregateIdentifier = "credentials-aggregate"

Variables

This section is empty.

Functions

func Authenticate

func Authenticate(username string, password string) bool

func CheckKnown

func CheckKnown(credentials *grpc_example.Credentials, projection *Projection) bool

func Encode

func Encode(password string) string

func HandleRegisterCredentialsCommand

func HandleRegisterCredentialsCommand(commandMessage *axon_server.Command, clientConnection *axon_utils.ClientConnection) (*axon_utils.Error, error)

func Init

func Init()

func SetCredentials

func SetCredentials(credentials *grpc_example.Credentials, clientConnection *axon_utils.ClientConnection) error

func UnsafeSetCredentials

func UnsafeSetCredentials(credentials *grpc_example.Credentials)

func Verify

func Verify(accessToken *grpc_example.AccessToken) bool

Types

type CredentialsAddedEvent

type CredentialsAddedEvent struct {
	grpc_example.CredentialsAddedEvent
}

Redeclare event types, so that they can be extended with event handler methods.

func (*CredentialsAddedEvent) ApplyTo

func (event *CredentialsAddedEvent) ApplyTo(projectionWrapper interface{})

type CredentialsRemovedEvent

type CredentialsRemovedEvent struct {
	grpc_example.CredentialsRemovedEvent
}

func (*CredentialsRemovedEvent) ApplyTo

func (event *CredentialsRemovedEvent) ApplyTo(projectionWrapper interface{})

type Projection

type Projection struct {
	Credentials    map[string]string
	AggregateState axon_utils.AggregateState
}

func RestoreProjection

func RestoreProjection(aggregateIdentifier string, clientConnection *axon_utils.ClientConnection) *Projection

func (*Projection) Apply

func (projection *Projection) Apply(event axon_utils.Event)

Jump to

Keyboard shortcuts

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