model

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2018 License: MIT Imports: 2 Imported by: 59

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserInfo

type UserInfo struct {
	Sub       string `json:"sub"`
	Picture   string `json:"picture,omitempty"`
	Name      string `json:"name,omitempty"`
	Email     string `json:"email,omitempty"`
	Origin    string `json:"origin,omitempty"`
	Expiry    int64  `json:"exp,omitempty"`
	Refreshes int    `json:"refs,omitempty"`
	Domain    string `json:"domain,omitempty"`
}

UserInfo holds the parameters returned by the backends. This information will be serialized to build the JWT token contents.

func (UserInfo) AsMap added in v1.2.4

func (u UserInfo) AsMap() map[string]interface{}

func (UserInfo) Valid

func (u UserInfo) Valid() error

Valid lets us use the user info as Claim for jwt-go. It checks the token expiry.

Jump to

Keyboard shortcuts

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