auth

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bind

func Bind(serverCtx *context.Context, group *echo.Group, auth Authenticator)

func Required

func Required(serverCtx *context.Context) echo.MiddlewareFunc

Types

type Authenticator

type Authenticator interface {
	Authenticate(ctx echo.Context) error
	Callback(ctx echo.Context) (*UserProfile, error)
}
type SocialLink struct {
	ServiceName string
	UserKey     string
	UserName    string
}

type UserProfile

type UserProfile struct {
	Email      string
	SocialLink *SocialLink
}

func (*UserProfile) AsUser

func (profile *UserProfile) AsUser() *users.User

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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