Documentation
¶
Index ¶
- func Authorization(next http.Handler) http.Handler
- func Dashboard(w http.ResponseWriter, r *http.Request)
- func Forgot(w http.ResponseWriter, r *http.Request)
- func ForgotPost(w http.ResponseWriter, r *http.Request)
- func Logout(w http.ResponseWriter, r *http.Request)
- func NoAuthorization(next http.Handler) http.Handler
- func Serve()
- func ServeFiles(router chi.Router)
- func SignIn(w http.ResponseWriter, r *http.Request)
- func SignInPost(w http.ResponseWriter, r *http.Request)
- type AuthenticationClaims
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Authorization ¶
Authorization ensures that requests contain a valid JWT token.
func Dashboard ¶
func Dashboard(w http.ResponseWriter, r *http.Request)
Dashboard renders the dashboard page.
func Forgot ¶
func Forgot(w http.ResponseWriter, r *http.Request)
Forgot renders the forgot password page.
func ForgotPost ¶
func ForgotPost(w http.ResponseWriter, r *http.Request)
ForgotPost handles forgot password requests.
func Logout ¶
func Logout(w http.ResponseWriter, r *http.Request)
Logout removes the stored token and redirects to the sign in page.
func NoAuthorization ¶
NoAuthorization ensures that requests do not contain valid JWT tokens.
func ServeFiles ¶
ServeFiles starts a http.FileServer to serve static files from public.
func SignInPost ¶
func SignInPost(w http.ResponseWriter, r *http.Request)
SignInPost handles sign in requests.
Types ¶
type AuthenticationClaims ¶
type AuthenticationClaims struct { ID uint64 `json:"id"` jwt.StandardClaims }
AuthenticationClaims holds JWT claims information.
Click to show internal directories.
Click to hide internal directories.