handler

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateToken

func CreateToken(user user.User, expiresIn, svcTokenID string) (string, error)

CreateToken creates a token for a user

func GetUserID

func GetUserID(r *http.Request) string

GetUserID returns the logged in user details

func IsValidToken

func IsValidToken(r *http.Request) (error, *contextTY.McApiContext)

steps to verify the authentication 1. Verify the token in header 2. Verify the token in cookie

func MiddlewareAuthenticationVerification

func MiddlewareAuthenticationVerification(next http.Handler) http.Handler

MiddlewareAuthenticationVerification verifies user auth details

Types

This section is empty.

Jump to

Keyboard shortcuts

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