MCPcopy
hub / github.com/oauth2-proxy/oauth2-proxy / TestSessionValidationFailure

Function TestSessionValidationFailure

oauthproxy_test.go:561–572  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

559}
560
561func TestSessionValidationFailure(t *testing.T) {
562 patTest, err := NewPassAccessTokenTest(PassAccessTokenTestOptions{
563 ValidToken: false,
564 })
565 require.NoError(t, err)
566 t.Cleanup(patTest.Close)
567
568 // An unsuccessful validation will return 403 and not set the auth cookie.
569 code, cookie := patTest.getCallbackEndpoint()
570 assert.Equal(t, http.StatusForbidden, code)
571 assert.Equal(t, "", cookie)
572}
573
574type SignInPageTest struct {
575 opts *options.Options

Callers

nothing calls this directly

Calls 2

getCallbackEndpointMethod · 0.95
NewPassAccessTokenTestFunction · 0.85

Tested by

no test coverage detected