auth

package
v0.0.0-...-fdf5f90 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BloqsAuther

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

func NewBloqsAuther

func NewBloqsAuther(ctx context.Context, creds db.DataManipulater) (*BloqsAuther, error)

func (*BloqsAuther) CheckAccessBasic

func (a *BloqsAuther) CheckAccessBasic(ctx context.Context, c *proto.Credentials_Basic) error

func (*BloqsAuther) GrantSuper

func (a *BloqsAuther) GrantSuper(ctx context.Context, creds *proto.Credentials) error

func (*BloqsAuther) IsSuperBasic

func (a *BloqsAuther) IsSuperBasic(ctx context.Context, creds *proto.Credentials_Basic) (super bool, err error)

func (*BloqsAuther) RevokeSuper

func (a *BloqsAuther) RevokeSuper(ctx context.Context, creds *proto.Credentials) error

func (*BloqsAuther) SignInBasic

func (a *BloqsAuther) SignInBasic(ctx context.Context, c *proto.Credentials_Basic) error

func (*BloqsAuther) SignOutBasic

func (a *BloqsAuther) SignOutBasic(ctx context.Context, c *proto.Credentials_Basic) error

type BloqsTokener

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

func NewBloqsTokener

func NewBloqsTokener(secrets db.KVDBer) *BloqsTokener

func (*BloqsTokener) GenToken

func (t *BloqsTokener) GenToken(ctx context.Context, p *auth.Payload) (tokenstr auth.Token, err error)

func (*BloqsTokener) ParseToken

func (t *BloqsTokener) ParseToken(ctx context.Context, tk auth.Token) (*jwt.Token, error)

func (*BloqsTokener) RevokeToken

func (t *BloqsTokener) RevokeToken(ctx context.Context, tk auth.Token) error

func (*BloqsTokener) VerifyToken

func (t *BloqsTokener) VerifyToken(ctx context.Context, tk auth.Token, p auth.Permission) (bool, error)

Jump to

Keyboard shortcuts

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