diff --git a/internal/pipeline/authenticators/jwt_authenticator_test.go b/internal/pipeline/authenticators/jwt_authenticator_test.go index 5fffcf0e3..ebf010242 100644 --- a/internal/pipeline/authenticators/jwt_authenticator_test.go +++ b/internal/pipeline/authenticators/jwt_authenticator_test.go @@ -109,9 +109,10 @@ assertions: // token extractor settings assert.IsType(t, extractors.CompositeExtractStrategy{}, auth.ads) - assert.Len(t, auth.ads, 2) + assert.Len(t, auth.ads, 3) assert.Contains(t, auth.ads, extractors.HeaderValueExtractStrategy{Name: "Authorization", Prefix: "Bearer"}) assert.Contains(t, auth.ads, extractors.QueryParameterExtractStrategy{Name: "access_token"}) + assert.Contains(t, auth.ads, extractors.BodyParameterExtractStrategy{Name: "access_token"}) // assertions settings assert.NoError(t, auth.a.ScopesMatcher.Match([]string{})) @@ -159,9 +160,10 @@ cache_ttl: 5s`), // token extractor settings assert.IsType(t, extractors.CompositeExtractStrategy{}, auth.ads) - assert.Len(t, auth.ads, 2) + assert.Len(t, auth.ads, 3) assert.Contains(t, auth.ads, extractors.HeaderValueExtractStrategy{Name: "Authorization", Prefix: "Bearer"}) assert.Contains(t, auth.ads, extractors.QueryParameterExtractStrategy{Name: "access_token"}) + assert.Contains(t, auth.ads, extractors.BodyParameterExtractStrategy{Name: "access_token"}) // assertions settings assert.NoError(t, auth.a.ScopesMatcher.Match([]string{})) diff --git a/internal/pipeline/authenticators/oauth2_introspection_authenticator_test.go b/internal/pipeline/authenticators/oauth2_introspection_authenticator_test.go index 4e0f63d82..e0f778cd4 100644 --- a/internal/pipeline/authenticators/oauth2_introspection_authenticator_test.go +++ b/internal/pipeline/authenticators/oauth2_introspection_authenticator_test.go @@ -146,9 +146,10 @@ session: // assert token extractor settings assert.IsType(t, extractors.CompositeExtractStrategy{}, auth.ads) - assert.Len(t, auth.ads, 2) + assert.Len(t, auth.ads, 3) assert.Contains(t, auth.ads, extractors.HeaderValueExtractStrategy{Name: "Authorization", Prefix: "Bearer"}) assert.Contains(t, auth.ads, extractors.QueryParameterExtractStrategy{Name: "access_token"}) + assert.Contains(t, auth.ads, extractors.BodyParameterExtractStrategy{Name: "access_token"}) // assert subject factory assert.NotNil(t, auth.sf)