ldap

package
v0.0.0-...-72eb3da Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2016 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

package ldap is an sso implementation. It uses an ldap backend to authenticate and optionally utilize ldap group memberships for setting up roles in the cookie/jwt which can later be used by applications for authorization.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUserNotFound = sso.ErrUserNotFound
	ErrUnauthorized = sso.ErrUnAuthorized
)
View Source
var BaseConf *sso.BaseConfig
View Source
var PrivateKey *rsa.PrivateKey

Functions

This section is empty.

Types

type LdapConfig

type LdapConfig struct {
	// contains filtered or unexported fields
}

type LdapSSO

type LdapSSO struct {
	Cookie *sso.CookieConfig
	Ldap   *LdapConfig
}

func NewLdapSSO

func NewLdapSSO() (*LdapSSO, error)

func (LdapSSO) Auth

func (ls LdapSSO) Auth(u string, p string) (*string, *[]string, error)

func (LdapSSO) BuildCookie

func (ls LdapSSO) BuildCookie(s string, exp time.Time) http.Cookie

func (LdapSSO) BuildJWTToken

func (ls LdapSSO) BuildJWTToken(u string, g []string, exp time.Time) (string, error)

func (LdapSSO) CTValidHours

func (ls LdapSSO) CTValidHours() int64

func (LdapSSO) CookieDomain

func (ls LdapSSO) CookieDomain() string

func (LdapSSO) CookieName

func (ls LdapSSO) CookieName() string

func (LdapSSO) Logout

func (ls LdapSSO) Logout(expT time.Time) http.Cookie

Jump to

Keyboard shortcuts

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