Documentation
¶
Index ¶
- Variables
- func PrettyToken(t string) string
- func RandomHash() string
- func RandomString(n int) string
- func RunSessionCleanup(shutdown <-chan struct{}, routines *sync.WaitGroup)
- func SetupRoutes(c *Config, shutdown <-chan struct{}, routines *sync.WaitGroup) http.Handler
- type Config
- type OidcWorkflow
- type SamlOpts
- type SamlWorkflow
- type Session
- type SessionManager
- type Verifier
Constants ¶
This section is empty.
Variables ¶
View Source
var VERSION string
Functions ¶
func PrettyToken ¶
func RandomHash ¶
func RandomHash() string
func RandomString ¶
func RunSessionCleanup ¶
Types ¶
type Config ¶
type Config struct {
StaticDir string
CookieSecret string
Certificate *cert.Certificate
}
Config holds the servers configurtion parameters
type OidcWorkflow ¶
type OidcWorkflow struct{}
type SamlWorkflow ¶
type SamlWorkflow struct {
}
type Session ¶
type Session struct {
Expires time.Time
Provider *oidc.Provider
Config *oauth2.Config
OIDCVerifier *Verifier
OAuthCodeOpts []oauth2.AuthCodeOption
SamlMw *samlsp.Middleware
SamlOpts SamlOpts
State string
CsrfToken string
}
func GetSession ¶
type SessionManager ¶
var Sessions SessionManager = SessionManager{ Lifetime: 12 * time.Hour, Items: map[string]*Session{}, }
func (*SessionManager) Add ¶
func (m *SessionManager) Add(s *Session, hash string)
func (*SessionManager) Get ¶
func (m *SessionManager) Get(hash string) *Session
func (*SessionManager) Remove ¶
func (m *SessionManager) Remove(hash string)
Click to show internal directories.
Click to hide internal directories.