- Added a new blueprint for OIDC logout that invalidates the Authentik session and redirects to a specified landing page. - Introduced custom CSS and JS files for branding, improving the visual integration of Authentik flows. - Updated Nginx configuration to serve the new branding assets and handle specific routes for signup and password recovery. - Enhanced the flow completion logic to support OIDC bridge functionality, including session management and redirect handling. - Implemented unit tests for the new OIDC bridge and flow context functionalities to ensure reliability.
16 lines
686 B
Go
16 lines
686 B
Go
package authentik
|
|
|
|
import "testing"
|
|
|
|
func TestSessionAuthenticated(t *testing.T) {
|
|
t.Parallel()
|
|
anonymous := "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzaWQiOiJhYmMiLCJpc3MiOiJhdXRoZW50aWsiLCJzdWIiOiJhbm9ueW1vdXMiLCJhdXRoZW50aWNhdGVkIjpmYWxzZX0.sig"
|
|
auth := "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzaWQiOiJhYmMiLCJpc3MiOiJhdXRoZW50aWsiLCJzdWIiOiJ1c2VyLTEyMyIsImF1dGhlbnRpY2F0ZWQiOnRydWV9.sig"
|
|
if SessionAuthenticated([]SerializedCookie{{Name: "authentik_session", Value: anonymous}}) {
|
|
t.Fatal("expected anonymous session to be rejected")
|
|
}
|
|
if !SessionAuthenticated([]SerializedCookie{{Name: "authentik_session", Value: auth}}) {
|
|
t.Fatal("expected authenticated session")
|
|
}
|
|
}
|