Documentation
¶
Overview ¶
SPDX-License-Identifier: Apache-2.0 Copyright © 2022 Roberto Hidalgo <nidito@un.rob.mx>
SPDX-License-Identifier: Apache-2.0 Copyright © 2022 Roberto Hidalgo <nidito@un.rob.mx>
SPDX-License-Identifier: Apache-2.0 Copyright © 2022 Roberto Hidalgo <nidito@un.rob.mx>
SPDX-License-Identifier: Apache-2.0 Copyright © 2022 Roberto Hidalgo <nidito@un.rob.mx>
Index ¶
- Constants
- func Cleanup() error
- func Enforce2FA(handler httprouter.Handle) httprouter.Handle
- func LoginHandler(w http.ResponseWriter, req *http.Request, ps httprouter.Params)
- func NewToken() string
- func RegisterSecondFactor() httprouter.Handle
- func RequireAdmin(handler httprouter.Handle) httprouter.Handle
- func RequireAdminOrRedirect(handler httprouter.Handle, target string) httprouter.Handle
- func RequireAuth(handler httprouter.Handle) httprouter.Handle
- func RequireAuthOrRedirect(handler httprouter.Handle, target string) httprouter.Handle
- func Route(wan *webauthn.WebAuthn, db db.Session, router http.Handler) http.Handler
- type Session
- type SessionUser
Constants ¶
View Source
const HeaderNameWAN = "webauthn"
View Source
const SessionNameWANAuth = "wan-auth"
View Source
const SessionNameWANRegister = "wan-register"
Variables ¶
This section is empty.
Functions ¶
func Enforce2FA ¶
func Enforce2FA(handler httprouter.Handle) httprouter.Handle
func LoginHandler ¶
func LoginHandler(w http.ResponseWriter, req *http.Request, ps httprouter.Params)
func RegisterSecondFactor ¶
func RegisterSecondFactor() httprouter.Handle
func RequireAdmin ¶
func RequireAdmin(handler httprouter.Handle) httprouter.Handle
func RequireAdminOrRedirect ¶
func RequireAdminOrRedirect(handler httprouter.Handle, target string) httprouter.Handle
func RequireAuth ¶
func RequireAuth(handler httprouter.Handle) httprouter.Handle
func RequireAuthOrRedirect ¶
func RequireAuthOrRedirect(handler httprouter.Handle, target string) httprouter.Handle
Types ¶
Click to show internal directories.
Click to hide internal directories.