mirror of
https://github.com/lukaszraczylo/traefikoidc.git
synced 2026-10-15 04:18:03 +00:00
fixup! Downgrade gorilla sessions preventing the publishing by traefik hub temporarily.
This commit is contained in:
+2
-3
@@ -863,9 +863,8 @@ func TestHandleLogout(t *testing.T) {
|
|||||||
},
|
},
|
||||||
endSessionURL: "https://provider/end-session",
|
endSessionURL: "https://provider/end-session",
|
||||||
expectedStatus: http.StatusFound,
|
expectedStatus: http.StatusFound,
|
||||||
// Fix: The entire URL should be URL-encoded
|
expectedURL: "https://provider/end-session?id_token_hint=test.id.token&post_logout_redirect_uri=http%3A%2F%2Fexample.com%2F",
|
||||||
expectedURL: "https://provider/end-session?id_token_hint=test.id.token&post_logout_redirect_uri=http%3A%2F%2Fexample.com%2F",
|
host: "test-host",
|
||||||
host: "test-host",
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Successful logout without end session endpoint",
|
name: "Successful logout without end session endpoint",
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
Copyright (c) 2024 The Gorilla Authors. All rights reserved.
|
Copyright (c) 2023 The Gorilla Authors. All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
modification, are permitted provided that the following conditions are
|
modification, are permitted provided that the following conditions are
|
||||||
|
|||||||
+1
-5
@@ -1,7 +1,4 @@
|
|||||||
# Gorilla Sessions
|
# sessions
|
||||||
|
|
||||||
> [!IMPORTANT]
|
|
||||||
> The latest version of this repository requires go 1.23 because of the new partitioned attribute. The last version that is compatible with older versions of go is v1.3.0.
|
|
||||||
|
|
||||||

|

|
||||||
[](https://codecov.io/github/gorilla/sessions)
|
[](https://codecov.io/github/gorilla/sessions)
|
||||||
@@ -77,7 +74,6 @@ Other implementations of the `sessions.Store` interface:
|
|||||||
- [github.com/dsoprea/go-appengine-sessioncascade](https://github.com/dsoprea/go-appengine-sessioncascade) - Memcache/Datastore/Context in AppEngine
|
- [github.com/dsoprea/go-appengine-sessioncascade](https://github.com/dsoprea/go-appengine-sessioncascade) - Memcache/Datastore/Context in AppEngine
|
||||||
- [github.com/kidstuff/mongostore](https://github.com/kidstuff/mongostore) - MongoDB
|
- [github.com/kidstuff/mongostore](https://github.com/kidstuff/mongostore) - MongoDB
|
||||||
- [github.com/srinathgs/mysqlstore](https://github.com/srinathgs/mysqlstore) - MySQL
|
- [github.com/srinathgs/mysqlstore](https://github.com/srinathgs/mysqlstore) - MySQL
|
||||||
- [github.com/danielepintore/gorilla-sessions-mysql](https://github.com/danielepintore/gorilla-sessions-mysql) - MySQL
|
|
||||||
- [github.com/EnumApps/clustersqlstore](https://github.com/EnumApps/clustersqlstore) - MySQL Cluster
|
- [github.com/EnumApps/clustersqlstore](https://github.com/EnumApps/clustersqlstore) - MySQL Cluster
|
||||||
- [github.com/antonlindstrom/pgstore](https://github.com/antonlindstrom/pgstore) - PostgreSQL
|
- [github.com/antonlindstrom/pgstore](https://github.com/antonlindstrom/pgstore) - PostgreSQL
|
||||||
- [github.com/boj/redistore](https://github.com/boj/redistore) - Redis
|
- [github.com/boj/redistore](https://github.com/boj/redistore) - Redis
|
||||||
|
|||||||
+9
-12
@@ -1,6 +1,5 @@
|
|||||||
// Copyright 2012 The Gorilla Authors. All rights reserved.
|
//go:build !go1.11
|
||||||
// Use of this source code is governed by a BSD-style
|
// +build !go1.11
|
||||||
// license that can be found in the LICENSE file.
|
|
||||||
|
|
||||||
package sessions
|
package sessions
|
||||||
|
|
||||||
@@ -9,15 +8,13 @@ import "net/http"
|
|||||||
// newCookieFromOptions returns an http.Cookie with the options set.
|
// newCookieFromOptions returns an http.Cookie with the options set.
|
||||||
func newCookieFromOptions(name, value string, options *Options) *http.Cookie {
|
func newCookieFromOptions(name, value string, options *Options) *http.Cookie {
|
||||||
return &http.Cookie{
|
return &http.Cookie{
|
||||||
Name: name,
|
Name: name,
|
||||||
Value: value,
|
Value: value,
|
||||||
Path: options.Path,
|
Path: options.Path,
|
||||||
Domain: options.Domain,
|
Domain: options.Domain,
|
||||||
MaxAge: options.MaxAge,
|
MaxAge: options.MaxAge,
|
||||||
Secure: options.Secure,
|
Secure: options.Secure,
|
||||||
HttpOnly: options.HttpOnly,
|
HttpOnly: options.HttpOnly,
|
||||||
Partitioned: options.Partitioned,
|
|
||||||
SameSite: options.SameSite,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+21
@@ -0,0 +1,21 @@
|
|||||||
|
//go:build go1.11
|
||||||
|
// +build go1.11
|
||||||
|
|
||||||
|
package sessions
|
||||||
|
|
||||||
|
import "net/http"
|
||||||
|
|
||||||
|
// newCookieFromOptions returns an http.Cookie with the options set.
|
||||||
|
func newCookieFromOptions(name, value string, options *Options) *http.Cookie {
|
||||||
|
return &http.Cookie{
|
||||||
|
Name: name,
|
||||||
|
Value: value,
|
||||||
|
Path: options.Path,
|
||||||
|
Domain: options.Domain,
|
||||||
|
MaxAge: options.MaxAge,
|
||||||
|
Secure: options.Secure,
|
||||||
|
HttpOnly: options.HttpOnly,
|
||||||
|
SameSite: options.SameSite,
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+5
-10
@@ -1,11 +1,8 @@
|
|||||||
// Copyright 2012 The Gorilla Authors. All rights reserved.
|
//go:build !go1.11
|
||||||
// Use of this source code is governed by a BSD-style
|
// +build !go1.11
|
||||||
// license that can be found in the LICENSE file.
|
|
||||||
|
|
||||||
package sessions
|
package sessions
|
||||||
|
|
||||||
import "net/http"
|
|
||||||
|
|
||||||
// Options stores configuration for a session or session store.
|
// Options stores configuration for a session or session store.
|
||||||
//
|
//
|
||||||
// Fields are a subset of http.Cookie fields.
|
// Fields are a subset of http.Cookie fields.
|
||||||
@@ -16,9 +13,7 @@ type Options struct {
|
|||||||
// deleted after the browser session ends.
|
// deleted after the browser session ends.
|
||||||
// MaxAge<0 means delete cookie immediately.
|
// MaxAge<0 means delete cookie immediately.
|
||||||
// MaxAge>0 means Max-Age attribute present and given in seconds.
|
// MaxAge>0 means Max-Age attribute present and given in seconds.
|
||||||
MaxAge int
|
MaxAge int
|
||||||
Secure bool
|
Secure bool
|
||||||
HttpOnly bool
|
HttpOnly bool
|
||||||
Partitioned bool
|
|
||||||
SameSite http.SameSite
|
|
||||||
}
|
}
|
||||||
|
|||||||
+23
@@ -0,0 +1,23 @@
|
|||||||
|
//go:build go1.11
|
||||||
|
// +build go1.11
|
||||||
|
|
||||||
|
package sessions
|
||||||
|
|
||||||
|
import "net/http"
|
||||||
|
|
||||||
|
// Options stores configuration for a session or session store.
|
||||||
|
//
|
||||||
|
// Fields are a subset of http.Cookie fields.
|
||||||
|
type Options struct {
|
||||||
|
Path string
|
||||||
|
Domain string
|
||||||
|
// MaxAge=0 means no Max-Age attribute specified and the cookie will be
|
||||||
|
// deleted after the browser session ends.
|
||||||
|
// MaxAge<0 means delete cookie immediately.
|
||||||
|
// MaxAge>0 means Max-Age attribute present and given in seconds.
|
||||||
|
MaxAge int
|
||||||
|
Secure bool
|
||||||
|
HttpOnly bool
|
||||||
|
// Defaults to http.SameSiteDefaultMode
|
||||||
|
SameSite http.SameSite
|
||||||
|
}
|
||||||
Vendored
+2
-2
@@ -4,8 +4,8 @@ github.com/google/uuid
|
|||||||
# github.com/gorilla/securecookie v1.1.2
|
# github.com/gorilla/securecookie v1.1.2
|
||||||
## explicit; go 1.20
|
## explicit; go 1.20
|
||||||
github.com/gorilla/securecookie
|
github.com/gorilla/securecookie
|
||||||
# github.com/gorilla/sessions v1.4.0
|
# github.com/gorilla/sessions v1.3.0
|
||||||
## explicit; go 1.23
|
## explicit; go 1.20
|
||||||
github.com/gorilla/sessions
|
github.com/gorilla/sessions
|
||||||
# golang.org/x/time v0.7.0
|
# golang.org/x/time v0.7.0
|
||||||
## explicit; go 1.18
|
## explicit; go 1.18
|
||||||
|
|||||||
Reference in New Issue
Block a user