webutil

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2019 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAuthTokenCookie

func AddAuthTokenCookie(ctx web.Context, token string)

AddAuthTokenCookie adds given token to a cookie

func AddAuthUserCookie

func AddAuthUserCookie(ctx web.Context, user *models.User)

AddAuthUserCookie generates Auth Token and adds a cookie

func GetOAuthBaseURL

func GetOAuthBaseURL(ctx web.Context) string

GetOAuthBaseURL returns the OAuth base URL used for host-wide OAuth authentication For Single Tenant HostMode, BaseURL is the current BaseURL For Multi Tenant HostMode, BaseURL is //login.{HOST_DOMAIN}

func GetSignUpAuthCookie

func GetSignUpAuthCookie(ctx web.Context) string

GetSignUpAuthCookie returns the temporary temporary domain-wide Auth Token and removes it

func ProcessImageUpload added in v0.18.0

func ProcessImageUpload(c web.Context, img *models.ImageUpload, preffix string) error

ProcessImageUpload uploads image to blob (if it's a new one)

func ProcessMultiImageUpload added in v0.18.0

func ProcessMultiImageUpload(c web.Context, imgs []*models.ImageUpload, preffix string) error

ProcessMultiImageUpload uploads multiple image to blob (if it's a new one)

func SetSignUpAuthCookie

func SetSignUpAuthCookie(ctx web.Context, user *models.User)

SetSignUpAuthCookie sets a temporary domain-wide Auth Token

Types

This section is empty.

Jump to

Keyboard shortcuts

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