oauth2_proxy/pkg/apis/options/sessions.go

33 lines
1.4 KiB
Go
Raw Permalink Normal View History

package options
import (
"github.com/pusher/oauth2_proxy/cookie"
)
// SessionOptions contains configuration options for the SessionStore providers.
type SessionOptions struct {
Type string `flag:"session-store-type" cfg:"session_store_type" env:"OAUTH2_PROXY_SESSION_STORE_TYPE"`
Cipher *cookie.Cipher
CookieStoreOptions
2019-05-09 23:09:22 +00:00
RedisStoreOptions
}
// CookieSessionStoreType is used to indicate the CookieSessionStore should be
// used for storing sessions.
var CookieSessionStoreType = "cookie"
// CookieStoreOptions contains configuration options for the CookieSessionStore.
type CookieStoreOptions struct{}
2019-05-09 23:09:22 +00:00
2019-05-16 16:03:38 +00:00
// RedisSessionStoreType is used to indicate the RedisSessionStore should be
2019-05-09 23:09:22 +00:00
// used for storing sessions.
var RedisSessionStoreType = "redis"
2019-05-16 16:03:38 +00:00
// RedisStoreOptions contains configuration options for the RedisSessionStore.
2019-05-09 23:09:22 +00:00
type RedisStoreOptions struct {
2019-05-24 16:32:55 +00:00
RedisConnectionURL string `flag:"redis-connection-url" cfg:"redis_connection_url" env:"OAUTH2_PROXY_REDIS_CONNECTION_URL"`
UseSentinel bool `flag:"redis-use-sentinel" cfg:"redis_use_sentinel" env:"OAUTH2_PROXY_REDIS_USE_SENTINEL"`
SentinelMasterName string `flag:"redis-sentinel-master-name" cfg:"redis_sentinel_master_name" env:"OAUTH2_PROXY_REDIS_SENTINEL_MASTER_NAME"`
SentinelConnectionURLs []string `flag:"redis-sentinel-connection-urls" cfg:"redis_sentinel_connection_urls" env:"OAUTH2_PROXY_REDIS_SENTINEL_CONNECTION_URLS"`
2019-05-09 23:09:22 +00:00
}