bearer

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	EmailAttr         string
	Key               *keys.PrivateKey
	UserID            *user.ID
	ContainerID       cid.ID
	LifeTime          uint64
	MaxObjectSize     uint64
	ObjectMaxLifetime time.Duration
}

Config for bearer token generator.

type Generator

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

Generator is bearer token generator.

func NewGenerator

func NewGenerator(config *Config) *Generator

NewGenerator creates new bearer token generator using config.

func (*Generator) NewBearer

func (b *Generator) NewBearer(email string, currentEpoch uint64, msPerEpoch int64) (string, string, error)

NewBearer generates new token for supplied email.

Jump to

Keyboard shortcuts

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