Started LDAP support
This commit is contained in:
28
sso-proxy/backend/interface.go
Normal file
28
sso-proxy/backend/interface.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package backend
|
||||
|
||||
import "time"
|
||||
|
||||
// Session holds info about the logged-in user that won't change
|
||||
type Session struct {
|
||||
SessionID string
|
||||
Expiration time.Time
|
||||
UserID string
|
||||
LdapDN string
|
||||
}
|
||||
|
||||
// SessionCache holds volatile information about the logged-in user
|
||||
type SessionCache struct {
|
||||
Valid bool
|
||||
Groups []string
|
||||
DisplayName string
|
||||
Email string
|
||||
}
|
||||
|
||||
type Backend interface {
|
||||
PutSession(session Session, cache SessionCache) error
|
||||
GetSession(id string) (Session, *SessionCache, error)
|
||||
EndSession(id string)
|
||||
NewSessionID() (string, error)
|
||||
DoMaintenance()
|
||||
Ping() error
|
||||
}
|
||||
Reference in New Issue
Block a user