I tried password grant type with a user having "&" character for the
password. If I enter the password to the curl command after url encoding,
it worked fine for me.

Can you see any error log in backend? Try enabling debug logs for the
packages org.wso2.carbon.identity.oauth and org.wso2.carbon.identity.oauth2.

Thanks,

On Fri, Jan 20, 2017 at 10:30 AM, Sameera Gunarathne <[email protected]>
wrote:

> Hi all,
>
> I am trying to get auth token from '/oauth2/token' endpoint using
> following request which accesses oauth2 webapp deployed from
> identity-inbound-auth-oauth extension in EMM.
>
> curl -k -d "username=test_user&scope=default appm:read
> device:android:enroll device:android:event:manage configuration:view
> device:android:disenroll&password=test%26grant_type=password" -H
> "Authorization: Basic blZYOWd5aFVIdmEzUEMxWjZmcnpTT1
> 9yWWdFYTpiUHliOVE3MXVuS1g4dWdXNE5QU3B2MmxJTFVh" -H "Content-Type:
> application/x-www-form-urlencoded" https://10.42.0.68:9443/oauth2/token
>
> This request is equivalent to the request constructed in EMM. The issue I
> get is whenever I enter a password with special characters (&,!,é) and it
> is url encoded such as test& -> test%26 and it will give a invalid grant.
> Any suggestions to resolve this issue would be much appreciated.
>
> Thanks & Regards,
> --
> Sameera Gunarathne
> Software Engineer, WSO2 Inc. http://wso2.com
> <http://l.facebook.com/l.php?u=http%3A%2F%2Fwso2.com&h=gAQEswASa>
> Email: [email protected]
> Mobile: +94714155561
>



-- 
Maduranga Siriwardena
Software Engineer
WSO2 Inc; http://wso2.com/

Email: [email protected]
Mobile: +94718990591
Blog: http://madurangasblogs.blogspot.com/
<http://wso2.com/signature>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to