Back to

package jwtutil

Latest Go to latest
Published: Feb 6, 2018 | License: MIT | Module:



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