Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AuthenticPerson ¶
type Person ¶
type Person struct { Birthdate string `json:"birthdate,omitempty" db:"birthdate"` Department string `json:"department,omitempty" db:"department"` Email string `json:"email,omitempty" db:"email"` FamilyName string `json:"family_name,omitempty" db:"family_name"` GivenName string `json:"given_name,omitempty" db:"given_name"` Groups []string `json:"groups,omitempty" db:"-"` PhoneNumber string `json:"phone_number,omitempty" db:"phone_number"` StreetAddress string `json:"street_address,omitempty" db:"street_address"` Locality string `json:"locality,omitempty" db:"locality"` PostalCode string `json:"postal_code,omitempty" db:"postal_code"` }
type Store ¶
type Store interface { Authenticate(userID, password string) (string, error) IsSessionActive(r *http.Request, sessionName string) (string, bool) SaveSession(r *http.Request, w http.ResponseWriter, authTime time.Time, userID, sessionName string) error Lookup(userID string) (*Person, error) Ping() error ReadOnly() bool Put(userID string, person *Person) error SetPassword(userID, password string) error }
func NewEmbeddedStore ¶
func NewLdapStore ¶
func NewLdapStore(sessionStore sessions.Store, users map[string]AuthenticPerson, sessionTTL int64, settings *StoreSettings) (Store, error)
func NewSqlStore ¶
type StoreSettings ¶
type StoreSettings struct { URI string `json:"uri,omitempty"` CredentialsQuery string `json:"credentials_query,omitempty"` GroupsQuery string `json:"groups_query,omitempty"` DetailsQuery string `json:"details_query,omitempty"` Parameters map[string]string `json:"parameters,omitempty"` Update string `json:"update,omitempty"` SetPassword string `json:"set_password,omitempty"` }
Click to show internal directories.
Click to hide internal directories.