You've already forked oauth2-proxy
mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2025-12-01 22:51:45 +02:00
Rename CookieOptions to Cookie
This commit is contained in:
@@ -6,8 +6,8 @@ import (
|
||||
"github.com/spf13/pflag"
|
||||
)
|
||||
|
||||
// CookieOptions contains configuration options relating to Cookie configuration
|
||||
type CookieOptions struct {
|
||||
// Cookie contains configuration options relating to Cookie configuration
|
||||
type Cookie struct {
|
||||
Name string `flag:"cookie-name" cfg:"cookie_name"`
|
||||
Secret string `flag:"cookie-secret" cfg:"cookie_secret"`
|
||||
Domains []string `flag:"cookie-domain" cfg:"cookie_domains"`
|
||||
@@ -35,9 +35,9 @@ func cookieFlagSet() *pflag.FlagSet {
|
||||
return flagSet
|
||||
}
|
||||
|
||||
// defaultCookieOptions creates a CookieOptions populating each field with its default value
|
||||
func defaultCookieOptions() CookieOptions {
|
||||
return CookieOptions{
|
||||
// cookieDefaults creates a Cookie populating each field with its default value
|
||||
func cookieDefaults() Cookie {
|
||||
return Cookie{
|
||||
Name: "_oauth2_proxy",
|
||||
Secret: "",
|
||||
Domains: nil,
|
||||
|
||||
@@ -59,7 +59,7 @@ type Options struct {
|
||||
Banner string `flag:"banner" cfg:"banner"`
|
||||
Footer string `flag:"footer" cfg:"footer"`
|
||||
|
||||
Cookie CookieOptions `cfg:",squash"`
|
||||
Cookie Cookie `cfg:",squash"`
|
||||
Session SessionOptions `cfg:",squash"`
|
||||
Logging Logging `cfg:",squash"`
|
||||
|
||||
@@ -153,7 +153,7 @@ func NewOptions() *Options {
|
||||
RealClientIPHeader: "X-Real-IP",
|
||||
ForceHTTPS: false,
|
||||
DisplayHtpasswdForm: true,
|
||||
Cookie: defaultCookieOptions(),
|
||||
Cookie: cookieDefaults(),
|
||||
Session: SessionOptions{
|
||||
Type: "cookie",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user