providers/proxy: outpost wide logout implementation (#4605)

* initial outpost wide logout implementation

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* handle deserialize error

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* update docs

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* fix file cleanup, add tests

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* fix tests

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

---------

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L
2023-02-02 21:18:59 +01:00
committed by GitHub
parent 798245b8db
commit 7d4ce41e12
13 changed files with 239 additions and 21 deletions

View File

@ -6,6 +6,7 @@ import (
"net/url"
"testing"
"github.com/google/uuid"
"github.com/stretchr/testify/assert"
"goauthentik.io/internal/outpost/proxyv2/constants"
)
@ -70,6 +71,8 @@ func TestProxy_ModifyRequest_Claims(t *testing.T) {
rr := httptest.NewRecorder()
s, _ := a.sessions.Get(req, constants.SessionName)
s.ID = uuid.New().String()
s.Options.MaxAge = 86400
s.Values[constants.SessionClaims] = Claims{
Sub: "foo",
Proxy: &ProxyClaims{
@ -98,6 +101,8 @@ func TestProxy_ModifyRequest_Claims_Invalid(t *testing.T) {
rr := httptest.NewRecorder()
s, _ := a.sessions.Get(req, constants.SessionName)
s.ID = uuid.New().String()
s.Options.MaxAge = 86400
s.Values[constants.SessionClaims] = Claims{
Sub: "foo",
Proxy: &ProxyClaims{