util

package
v0.0.0-...-7f22e17 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

util.go -- Utility functions to be used in main Currently just middleware functions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCORS

func AddCORS(handler http.Handler) http.Handler

func CheckToken

func CheckToken(userToken string) (*jwt.Token, error)

func GetId

func GetId(req *http.Request) string

func Log

func Log(handler http.Handler) http.Handler

HTTP logger

func MakeToken

func MakeToken(id string) (string, error)

func Protect

func Protect(handler http.Handler) http.Handler

HTTP Auth Middleware -- Should Expect JWT in Header (Not Cookie!)

Types

This section is empty.

Jump to

Keyboard shortcuts

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