Hi Thomas,

Try a request similar to following and see if it works. You need to change
the values highlighted.

curl -k -X POST -H "Authorization: Basic *XXXX*" --data
"grant_type=password&scope=openid&username=*WSO2.COM/tharindu
<http://WSO2.COM/tharindu>*&password=*tharindu*" https://apim:8243/token

Thanks,
TharinduE

On Wed, Jan 17, 2018 at 8:41 AM, Thomas LEGRAND <
[email protected]> wrote:

> Hello,
>
> I configured the Identity Server (IS) to be the Key Manager of the API
> Manager (APIM). In the IS, I configured a secondary user store where I will
> have my users of my applications. But, I think I missed something because
> when I want to generate a OAuth token for a user stored in this secondary
> user store, I have an error:
>
> My request:
>
> curl -k -d "grant_type=password&username=<USR_NAME>&password=<USR_PASSWD>"
> -H "Authorization: Basic <BASE64_KEY_SECRET_COUPLE>"
> https://apim:8243/token
>
> The response:
>
> {"error_description":"Authentication failed for <USR_NAME>@carbon.super","
> error":"invalid_grant"}.
>
> In the application in the store of the APIM, "Password" is ticked so the
> grant_type is right.
> And I tried with the following pattern for the <USR_NAME>:
> - <USR_NAME>
> - <DOMAIN>/<USR_NAME>
> - <DOMAIN>\<USR_NAME>
>
> Can you help me? How can I ensure that the APIM uses all of the user
> stores from the IS.
>
> Regards,
>
> Thomas
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

Tharindu Edirisinghe
Senior Software Engineer | WSO2 Inc
Platform Security Team
Blog : http://tharindue.blogspot.com
mobile : +94 775181586
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to