currentuser

package
v0.0.0-...-bd62b4a Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Copyright 2021 Chukwurah Somtoo. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Index

Constants

View Source
const Key currentUser = "currentUser"

Key is the key to access the currentUser ctx on req

Variables

This section is empty.

Functions

func CurrentUser

func CurrentUser(handler http.Handler) http.Handler

CurrentUser is a Middleware that checks if user is logged in

func RequireAuth

func RequireAuth(handler http.Handler) http.Handler

RequireAuth throws an error is user is not authorized

Types

This section is empty.

Jump to

Keyboard shortcuts

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