Help us shape the future of Go! Take the 2026 Go Developer Survey

session

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2015 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateToken

func GenerateToken(c context.Context, r *http.Request, user *model.User) (string, error)

GenerateToken generates a JWT token for the user session that can be appended to the #access_token segment to facilitate client-based OAuth2.

func GetUser

func GetUser(c context.Context, r *http.Request) *model.User

GetUser gets the currently authenticated user for the http.Request. The user details will be stored as either a simple API token or JWT bearer token.

Types

This section is empty.

Jump to

Keyboard shortcuts

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