auth

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

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