Version: v7.0.0+incompatible Latest Latest

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

Go to latest
Published: Aug 9, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 1 more Imports: 25 Imported by: 3




View Source
const UpdateLoginTimeQuery = `` /* 148-byte string literal not displayed */

UpdateLoginTimeQuery is meant to only update the last_authenticated field once per minute in order to avoid row-locking when the same user logs in frequently.


This section is empty.


func LoginHandler

func LoginHandler(db *sqlx.DB, cfg config.Config) http.HandlerFunc

func LogoutHandler

func LogoutHandler(secret string) http.HandlerFunc

func OauthLoginHandler

func OauthLoginHandler(db *sqlx.DB, cfg config.Config) http.HandlerFunc

OauthLoginHandler accepts a JSON web token previously obtained from an OAuth provider, decodes it, validates it, authorizes the user against the database, and returns the login result as either an error or success message

func RegisterUser

func RegisterUser(w http.ResponseWriter, r *http.Request)

RegisterUser is the handler for /users/register. It sends registration through Email.

func ResetPassword

func ResetPassword(db *sqlx.DB, cfg config.Config) http.HandlerFunc

func TokenLoginHandler

func TokenLoginHandler(db *sqlx.DB, cfg config.Config) http.HandlerFunc

func VerifyUrlOnWhiteList

func VerifyUrlOnWhiteList(urlString string, whiteListedUrls []string) (bool, error)


This section is empty.

Jump to

Keyboard shortcuts

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