From 81acef78adf60be7b5f5499328cbc715b5899471 Mon Sep 17 00:00:00 2001 From: aeneasr Date: Wed, 25 Sep 2019 13:56:17 +0200 Subject: [PATCH] authn: Force auth style in oauth2 client credentials authn\n\nCloses #260 --- pipeline/authn/authenticator_oauth2_client_credentials.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pipeline/authn/authenticator_oauth2_client_credentials.go b/pipeline/authn/authenticator_oauth2_client_credentials.go index 7b6d8ef113..72e653e4e1 100644 --- a/pipeline/authn/authenticator_oauth2_client_credentials.go +++ b/pipeline/authn/authenticator_oauth2_client_credentials.go @@ -8,9 +8,10 @@ import ( "golang.org/x/oauth2" - "github.com/ory/oathkeeper/driver/configuration" "github.com/ory/x/httpx" + "github.com/ory/oathkeeper/driver/configuration" + "github.com/ory/oathkeeper/pipeline" "github.com/pkg/errors" @@ -80,6 +81,7 @@ func (a *AuthenticatorOAuth2ClientCredentials) Authenticate(r *http.Request, con ClientSecret: password, Scopes: cf.Scopes, TokenURL: cf.TokenURL, + AuthStyle: oauth2.AuthStyleInHeader, } token, err := c.Token(context.WithValue(