authentication

package
v0.0.0-...-8fe8001 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateToken

func CreateToken(user *database.User) (signedToken string, err error)

CreateToken creates a signed JWT for a given user

func FromCookie

func FromCookie(accessTokenName string) jwtmiddleware.TokenExtractor

FromCookie returns a function that extracts the token from the specified key in the HTTP cookie, like "access_token"

func GoogleAuthenticationHandler

func GoogleAuthenticationHandler(response http.ResponseWriter, request *http.Request)

GoogleAuthenticationHandler handles Google Authentication Callback

func ParseToken

func ParseToken(signedToken string) (parsedToken *jwt.Token, err error)

ParseToken parses a signed token into a parsed token

func VerifyToken

func VerifyToken(token string) (*googleAuthIDTokenVerifier.ClaimSet, error)

VerifyToken checks if a Google token is valid

Types

This section is empty.

Jump to

Keyboard shortcuts

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