Documentation ¶
Index ¶
- func CreateToken(user *database.User) (signedToken string, err error)
- func FromCookie(accessTokenName string) jwtmiddleware.TokenExtractor
- func GoogleAuthenticationHandler(response http.ResponseWriter, request *http.Request)
- func ParseToken(signedToken string) (parsedToken *jwt.Token, err error)
- func VerifyToken(token string) (*googleAuthIDTokenVerifier.ClaimSet, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateToken ¶
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 ¶
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.
Click to show internal directories.
Click to hide internal directories.