auth

package
v0.0.0-...-ddfce29 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddListener_DeAuth

func AddListener_DeAuth(fn func(string))

Add de-auth listener callback.

func Auth

func Auth(w http.ResponseWriter, r *http.Request, vals map[string]string) (err error)

Authenticates new user by creating a new session.

func DeAuth

func DeAuth(w http.ResponseWriter, r *http.Request) (err error)

De-authenticates user.

func GetAuthdId

func GetAuthdId(r *http.Request) string

Retrieves authentication ID from the session. Returns empty string if not found.

func GetSessionValues

func GetSessionValues(r *http.Request) (info map[string]interface{}, err error)

Retrieve existing session.

func Initialize

func Initialize(cookieSessName, cookieStoreId, cookiePath, cookieDomain, cookieMaxAge string, onPanic func(string, string, ...interface{})) (err error)

Initializes authentication mechanism.

func IsAuthd

func IsAuthd(r *http.Request) bool

Checks if this user has been authenticated.

func Values_Array_ItemPush

func Values_Array_ItemPush(w http.ResponseWriter, r *http.Request, key string, item interface{})

XXX Experimental, not used. Adds item to an array of items in session.

Types

type Member

type Member struct {
	RemoteIP string
	Name     string
	Initials string
	Email    string
}

Jump to

Keyboard shortcuts

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