Files
ipasso/sso-proxy/backend/interface.go
2023-10-24 22:15:58 +02:00

29 lines
602 B
Go

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
}