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"`
Department string `json:"department,omitempty"`
Email string `json:"email,omitempty"`
FamilyName string `json:"family_name,omitempty"`
GivenName string `json:"given_name,omitempty"`
Groups []string `json:"groups,omitempty"`
PhoneNumber string `json:"phone_number,omitempty"`
StreetAddress string `json:"street_address,omitempty"`
Locality string `json:"locality,omitempty"`
PostalCode string `json:"postal_code,omitempty"`
}
type PersonDetails ¶ added in v0.7.1
type PersonDetails struct {
Birthdate sql.NullString `db:"birthdate"`
Department sql.NullString `db:"department"`
Email sql.NullString `db:"email"`
FamilyName sql.NullString `db:"family_name"`
GivenName sql.NullString `db:"given_name"`
PhoneNumber sql.NullString `db:"phone_number"`
StreetAddress sql.NullString `db:"street_address"`
Locality sql.NullString `db:"locality"`
PostalCode sql.NullString `db:"postal_code"`
}
func (PersonDetails) Person ¶ added in v0.7.1
func (p PersonDetails) Person() *Person
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.