usertok

package
v0.0.0-...-589bc69 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package usertok creates tokens which authenticate and identify users in a stateless way

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractUser

func ExtractUser(userTok string, secret []byte) string

ExtractUser takes in a userTok as returned by New() and extracts the user identifier that was passed into New() and returns it. Returns empty string if the user token can't be extracted due to an invalid token

func New

func New(user string, secret []byte) string

New returns a new user token given a user identifying string and a secret

Types

This section is empty.

Jump to

Keyboard shortcuts

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