Skip to main content

Hi Guys,

 

I have implementation of OAuth2 Provider in mule with grant_type client_credentials and I was trying this scenario: instead of passing of the client_id & client_secret as parameter I like it to be in the form of Authorization: Basic having the token Base64encoded (username:password) or (client_id:client_secret).

 

Right now I'm getting this error message :

Client ID: failed to present a secret and no security provider is configured to validate its credentials

 

I wonder where can I defined the credentials for this validation. I'm hoping it would be resolved by defining Principal (username:password) but the documentation of Mule doesn't show how to define the principals. Is there anyone who knows how to define principals in mule oauth2 provider config?

답변 7개
  1. 2016년 1월 18일 오전 8:52

    I must have missed this part of documentation: clientSecurityProvider validates client credentials, it’s only needed when a client is confidential AND has a client secret. Whenever the client credentials are sent on the authorization header, you need this provider to delegate the authentication.

     

    I applied clientSecurityProvider instead of resourceOwnerSecurityProvider and then assign the principal with the username. Now it works.

     

    Thanks