- 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.
22 lines
484 B
Go
22 lines
484 B
Go
package authentik
|
|
|
|
import "testing"
|
|
|
|
func TestIsTerminalFlowRedirect(t *testing.T) {
|
|
t.Parallel()
|
|
for _, tc := range []struct {
|
|
to string
|
|
want bool
|
|
}{
|
|
{"/auth/", true},
|
|
{"/auth", true},
|
|
{"http://authentik-server:9000/auth/", true},
|
|
{"/auth/if/user/", false},
|
|
{"/auth/if/flow/default-authentication-flow/", false},
|
|
} {
|
|
if got := isTerminalFlowRedirect(tc.to); got != tc.want {
|
|
t.Fatalf("isTerminalFlowRedirect(%q) = %v, want %v", tc.to, got, tc.want)
|
|
}
|
|
}
|
|
}
|