Back to godoc.org
github.com/gbrlsnchs/jwt/jwtutil

package jwtutil

v0.2.0
Latest Go to latest
Published: Feb 6, 2018 | License: MIT | Module: github.com/gbrlsnchs/jwt

Index

Constants

const (
	// Separator is the character between
	// "Bearer" and the token itself.
	Separator = " "
)

func BearerToken

func BearerToken(r *http.Request) (string, error)

BearerToken parses the Authorization HTTP header and retrieves only the token from it.

func Decode

func Decode(src string) ([]byte, error)

Decode returns a decoded string using base64 decoding.

func Encode

func Encode(src []byte) string

Encode returns an encoded string using base64 encoding.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier