Documentation ¶
Index ¶
- func ExpireWebauthnSession(session *sessions.Session, r *http.Request, w http.ResponseWriter)
- func FetchWebauthnSession(session *sessions.Session, key string, r *http.Request) (webauthn.SessionData, error)
- func GenChallenge() string
- func GetUserIP(r *http.Request) string
- func GetUsername(r *http.Request, regex string) (string, error)
- func JSONResponse(w http.ResponseWriter, d interface{}, c int)
- func PrettyPrint(data interface{})
- func SaveWebauthnSession(session *sessions.Session, key string, sessionData *webauthn.SessionData, ...) error
- func SetupLogging(name, loggingLevel string) *logrus.Entry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpireWebauthnSession ¶
ExpireWebauthnSession invalidate session by expiring cookie
func FetchWebauthnSession ¶
func FetchWebauthnSession(session *sessions.Session, key string, r *http.Request) (webauthn.SessionData, error)
Fetch webauthn session data from session store
func GetUsername ¶
Get "username" query param and validate against supplied regex
func JSONResponse ¶
func JSONResponse(w http.ResponseWriter, d interface{}, c int)
Marshal object to JSON and write response
func PrettyPrint ¶
func PrettyPrint(data interface{})
func SaveWebauthnSession ¶
func SaveWebauthnSession(session *sessions.Session, key string, sessionData *webauthn.SessionData, r *http.Request, w http.ResponseWriter) error
Save webauthn session data to session store
func SetupLogging ¶
SetupLogging setup logger
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.