(o *options.Options)
| 12 | ) |
| 13 | |
| 14 | func validateSessionCookieMinimal(o *options.Options) []string { |
| 15 | if !o.Session.Cookie.Minimal { |
| 16 | return []string{} |
| 17 | } |
| 18 | |
| 19 | msgs := []string{} |
| 20 | for _, header := range append(o.InjectRequestHeaders, o.InjectResponseHeaders...) { |
| 21 | for _, value := range header.Values { |
| 22 | if value.ClaimSource != nil { |
| 23 | if value.ClaimSource.Claim == "access_token" { |
| 24 | msgs = append(msgs, |
| 25 | fmt.Sprintf("access_token claim for header %q requires oauth tokens in sessions. session_cookie_minimal cannot be set", header.Name)) |
| 26 | } |
| 27 | if value.ClaimSource.Claim == "id_token" { |
| 28 | msgs = append(msgs, |
| 29 | fmt.Sprintf("id_token claim for header %q requires oauth tokens in sessions. session_cookie_minimal cannot be set", header.Name)) |
| 30 | } |
| 31 | } |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | if o.Cookie.Refresh != time.Duration(0) { |
| 36 | msgs = append(msgs, |
| 37 | "cookie_refresh > 0 requires oauth tokens in sessions. session_cookie_minimal cannot be set") |
| 38 | } |
| 39 | return msgs |
| 40 | } |
| 41 | |
| 42 | // validateRedisSessionStore builds a Redis Client from the options and |
| 43 | // attempts to connect, Set, Get and Del a random health check key |
no outgoing calls
no test coverage detected