auth

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAuth

func AddAuth(userID, authToken string, authType Type) error

AddAuth will add an external authentication token and type for a user.

func GetUserByAuth

func GetUserByAuth(authToken string, authType Type) *user.User

GetUserByAuth will return an existing user given auth details if a user has previously authenticated with that method.

func Setup

func Setup(db *data.Datastore)

Setup will initialize auth persistence.

Types

type Type

type Type string

Type represents a form of authentication.

const (
	// IndieAuth https://indieauth.spec.indieweb.org/.
	IndieAuth Type = "indieauth"
	Fediverse Type = "fediverse"
)

The different auth types we support.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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