auth

package
v0.0.0-...-23e694f Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2016 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB map[Oauth]*App = make(map[Oauth]*App)

Functions

func ClientDecrypter

func ClientDecrypter(key, clientID, clientSecret string) (name, id string)

func CreateJWTCookie

func CreateJWTCookie(jwtID string, issuer string, ctx *context.Context)

func GenerateJWTToken

func GenerateJWTToken(app *App, ctx *context.Context) string

func InvalidateJWTToken

func InvalidateJWTToken(ctx *context.Context)

func LoginRequired

func LoginRequired(ctx *context.Context)

func LoginRequiredApi

func LoginRequiredApi(ctx *context.Context)

Types

type App

type App struct {
	Name string `json:"name"`
	Id   string `json:"id"`
}

type Claims

type Claims struct {
	Ip string `json:"ip"`
	jwt.StandardClaims
}

type Oauth

type Oauth struct {
	Id     string `json:"id"`
	Secret string `json:"secret"`
}

Jump to

Keyboard shortcuts

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