usersec

package
v1.70.1 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0, BSD-3-Clause, Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserEventType added in v1.70.0

type UserEventType int

UserEventType is the type of user event, such as a successful login or a failed login or any other authenticated request.

const (
	// UserLoginSuccess is the event type for a successful user login, when a new session or JWT is created.
	UserLoginSuccess UserEventType = iota
	// UserLoginFailure is the event type for a failed user login, when the user ID is not found or the password is incorrect.
	UserLoginFailure
	// UserSet is the event type for a user ID operation that is not a login, such as any authenticated request made by the user.
	UserSet
)

type UserLoginOperation

type UserLoginOperation struct {
	dyngo.Operation
	EventType UserEventType
}

UserLoginOperation type representing a call to appsec.SetUser(). It gets both created and destroyed in a single call to ExecuteUserIDOperation

func StartUserLoginOperation

func StartUserLoginOperation(ctx context.Context, eventType UserEventType, args UserLoginOperationArgs) (*UserLoginOperation, *error)

func (*UserLoginOperation) Finish

func (op *UserLoginOperation) Finish(args UserLoginOperationRes)

type UserLoginOperationArgs

type UserLoginOperationArgs struct {
}

UserLoginOperationArgs is the user ID operation arguments.

func (UserLoginOperationArgs) IsArgOf

type UserLoginOperationRes

type UserLoginOperationRes struct {
	UserID    string
	SessionID string
}

UserLoginOperationRes is the user ID operation results.

func (UserLoginOperationRes) IsResultOf

Jump to

Keyboard shortcuts

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