mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2026-10-08 23:51:17 +02:00
* the attribute version is obsolete, it will be ignored, please remove it to avoid potential confusion Signed-off-by: Joost <439100+jvnoije@users.noreply.github.com> * Add cookie-csrf-samesite option Most of the code is copied form pull request #1947 Signed-off-by: Joost <439100+jvnoije@users.noreply.github.com> * Update CHANGELOG.md Signed-off-by: Joost <439100+jvnoije@users.noreply.github.com> * Removed release information (review comment) Signed-off-by: Joost <439100+jvnoije@users.noreply.github.com> * All cookie variables in a struct Signed-off-by: Joost <439100+jvnoije@users.noreply.github.com> * doc: add changelog entry for #3347 Signed-off-by: Jan Larwig <jan@larwig.com> * revert: unnecessary removal of docker compose version Signed-off-by: Jan Larwig <jan@larwig.com> * doc: sort csrf flags Signed-off-by: Jan Larwig <jan@larwig.com> --------- Signed-off-by: Joost <439100+jvnoije@users.noreply.github.com> Signed-off-by: Jan Larwig <jan@larwig.com> Co-authored-by: Jan Larwig <jan@larwig.com>
33 lines
626 B
Go
33 lines
626 B
Go
package cookies
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/oauth2-proxy/oauth2-proxy/v7/pkg/logger"
|
|
. "github.com/onsi/ginkgo/v2"
|
|
. "github.com/onsi/gomega"
|
|
)
|
|
|
|
const (
|
|
csrfState = "1234asdf1234asdf1234asdf"
|
|
csrfNonce = "0987lkjh0987lkjh0987lkjh"
|
|
|
|
cookieName = "cookie_test_12345"
|
|
cookieSecret = "3q48hmFH30FJ2HfJF0239UFJCVcl3kj3"
|
|
cookieDomain = "o2p.cookies.test"
|
|
cookiePath = "/cookie-tests"
|
|
|
|
sameSiteLax = "lax"
|
|
sameSiteStrict = "strict"
|
|
sameSiteNone = "none"
|
|
|
|
nowEpoch = 1609366421
|
|
)
|
|
|
|
func TestProviderSuite(t *testing.T) {
|
|
logger.SetOutput(GinkgoWriter)
|
|
|
|
RegisterFailHandler(Fail)
|
|
RunSpecs(t, "Cookies")
|
|
}
|