func runEndSessionTests()

in cmd/conformance/main.go [1318:1357]


func runEndSessionTests(ctx context.Context) {
	endSessionTestCases := []endSessionTest{
		{
			testName:  "Establish secure session then valid EndSession",
			expectErr: false,
		},
		{
			testName:         "No TLS records in request",
			expectErr:        true,
			mutateTLSRecords: emptyFn,
		},
		{
			testName:         "Invalid session key",
			expectErr:        true,
			mutateSessionKey: emptyFn,
		},
		{
			testName:  "JWT has invalid signature",
			expectErr: true,
			mutateJWT: invalidateJwtSignature,
			optional:  true,
		},
		{
			testName:  "JWT has a bad audience",
			expectErr: true,
			mutateJWT: badAudience,
			optional:  true,
		},
	}

	for _, testCase := range endSessionTestCases {
		err := runEndSessionTestCase(ctx, testCase)
		testPassed := testCase.expectErr == (err != nil)
		if testPassed {
			colour.Printf(" - ^2%v^R\n", testCase.testName)
		} else {
			printError(testCase.testName, err, testCase.optional)
		}
	}
}