auth

package
v0.24.6 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: AGPL-3.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	AuthTypeUnknown int = iota
	AuthTypeUser
	AuthTypeLinkShare
)

These are all valid auth types

Variables

This section is empty.

Functions

func GetAuthFromClaims

func GetAuthFromClaims(c echo.Context) (a web.Auth, err error)

GetAuthFromClaims returns a web.Auth object from jwt claims

func NewLinkShareJWTAuthtoken

func NewLinkShareJWTAuthtoken(share *models.LinkSharing) (token string, err error)

NewLinkShareJWTAuthtoken creates a new jwt token from a link share

func NewUserAuthTokenResponse

func NewUserAuthTokenResponse(u *user.User, c echo.Context, long bool) error

NewUserAuthTokenResponse creates a new user auth token response from a user object.

func NewUserJWTAuthtoken

func NewUserJWTAuthtoken(u *user.User, long bool) (token string, err error)

NewUserJWTAuthtoken generates and signes a new jwt token for a user. This is a global function to be able to call it from integration tests.

Types

type Token

type Token struct {
	Token string `` /* 178-byte string literal not displayed */
}

Token represents an authentification token

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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