auth

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SimpleTokenManager

type SimpleTokenManager struct {
	// contains filtered or unexported fields
}

func NewSimpleTokenManager

func NewSimpleTokenManager(ttl time.Duration) *SimpleTokenManager

func (*SimpleTokenManager) CreateAuthToken

func (tm *SimpleTokenManager) CreateAuthToken(ctx context.Context, subject string, perms libauth.Authz) (string, time.Time, error)

func (*SimpleTokenManager) GetExpiresAt

func (tm *SimpleTokenManager) GetExpiresAt(ctx context.Context) (time.Time, error)

func (*SimpleTokenManager) GetIdentity

func (tm *SimpleTokenManager) GetIdentity(ctx context.Context) (string, error)

AuthZReader methods

func (*SimpleTokenManager) GetPermissions

func (tm *SimpleTokenManager) GetPermissions(ctx context.Context) (libauth.Authz, error)

GetPermissions returns nil because we don't manage permissions.

func (*SimpleTokenManager) GetTokenString

func (tm *SimpleTokenManager) GetTokenString(ctx context.Context) (string, error)

func (*SimpleTokenManager) GetUsername

func (tm *SimpleTokenManager) GetUsername(ctx context.Context) (string, error)

func (*SimpleTokenManager) Login

func (tm *SimpleTokenManager) Login(ctx context.Context, username, password string) (middleware.LoginResponse, error)

func (*SimpleTokenManager) RefreshToken

func (tm *SimpleTokenManager) RefreshToken(ctx context.Context, tokenString string, withGracePeriod *time.Duration) (string, bool, time.Time, error)

func (*SimpleTokenManager) SetToken

func (tm *SimpleTokenManager) SetToken(ctx context.Context, tokenString string) (context.Context, error)

func (*SimpleTokenManager) ValidateAuthToken

func (tm *SimpleTokenManager) ValidateAuthToken(ctx context.Context) (context.Context, error)

Jump to

Keyboard shortcuts

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