BreenDeen
BreenDeen

Reputation: 710

Does Mule support password grant type for OAuth2

I looked at mule-oauth2.xsd and found only client credentials and authorization grant type elements. However, looking at the oauth2-provider:config it can be configured as supportedGrantTypes="RESOURCE_OWNER_PASSWORD_CREDENTIALS". If it does support resource owner password credentials, how can I configure an oauth2-client to retrieve a token? I am looking at retrieving a token from the OAuth2 provider using the oauth2:client. Here is an example of what I'm referring to, however, I want to achieve this for password.

 <http:request-config name="requestConfigWithOAuth">
    <oauth2:client-credentials-grant-type
            clientId="${client.id}"
            clientSecret="${client.secret}"
            tokenManager-ref="tokenManagerConfig">
        <oauth2:token-request tokenUrl="${token.url}"/>
    </oauth2:client-credentials-grant-type>
</http:request-config>

Upvotes: 3

Views: 1294

Answers (2)

catpaws
catpaws

Reputation: 2283

MuleSoft supports the following authentication in Mule 3.8 client apps:

Basic Authentication

NTLM Authentication

Digest Authentication

OAuth2 - Authorization Code

OAuth2 - Client Credentials

See the docs.

Upvotes: 0

Ashish
Ashish

Reputation: 24

@Breen- yes Mule provides Password Grant type. I recently configured for my APIs. In API management console, when you generate a client application , it provides an option for different grant types to select which is out of the box from MULE. you do not have to do any set up for this. It is through API management console on Anypoint platform. Let me know if any question.

Upvotes: 0

Related Questions