anon

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2018 License: GPL-3.0 Imports: 5 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnonAuth

type AnonAuth struct{}

AnonAuth is the singleton instance of the anonymous authorizer.

func (AnonAuth) AddRecord

func (AnonAuth) AddRecord(uid types.Uid, secret []byte, lifetime time.Duration) (int, auth.AuthErr)

AddRecord is a noop. Just report success.

func (AnonAuth) Authenticate

func (AnonAuth) Authenticate(secret []byte) (types.Uid, int, time.Time, auth.AuthErr)

Authenticate is not supported. It's used only at account creation time.

func (AnonAuth) GenSecret

func (AnonAuth) GenSecret(uid types.Uid, authLvl int, lifetime time.Duration) ([]byte, time.Time, auth.AuthErr)

GenSecret always fails.

func (AnonAuth) Init

func (AnonAuth) Init(unused string) error

Init is a noop, always returns success.

func (AnonAuth) IsUnique

func (AnonAuth) IsUnique(secret []byte) (bool, auth.AuthErr)

IsUnique for a noop. Anonymous login does not use secret, any secret is fine.

func (AnonAuth) UpdateRecord

func (AnonAuth) UpdateRecord(uid types.Uid, secret []byte, lifetime time.Duration) auth.AuthErr

UpdateRecord is a noop. Just report success.

Jump to

Keyboard shortcuts

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