Farasath Ahamed
Software Engineer, WSO2 Inc.; http://wso2.com
Mobile: +94777603866
Blog: blog.farazath.com
Twitter: @farazath619 <https://twitter.com/farazath619>
<http://wso2.com/signature>



On Fri, Jan 20, 2017 at 10:59 AM, Nuwandi Wickramasinghe <[email protected]>
wrote:

> In the request parameters in the curl command,
>
> *password=test%26grant_type=password*
>

>
> there's no parameter seperation between password and grant_type. Was this
> the same command you sent?
>


As Nuwandi has pointed out if the password you are trying out is "test&"
the correct curl command would be,

curl -k -d "username=test_user&scope=default appm:read
device:android:enroll device:android:event:manage configuration:view
device:android:disenroll&*password=test%26&grant_type=**password*" -H
"Authorization: Basic blZYOWd5aFVIdmEzUEMxWjZmcnpTT1
9yWWdFYTpiUHliOVE3MXVuS1g4dWdXNE5QU3B2MmxJTFVh" -H "Content-Type:
application/x-www-form-urlencoded" https://10.42.0.68:9443/oauth2/token


>
> On Fri, Jan 20, 2017 at 10:48 AM, Maduranga Siriwardena <
> [email protected]> wrote:
>
>> 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.o
>> auth2.
>>
>> 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 <+94%2071%20899%200591>
>> Blog: http://madurangasblogs.blogspot.com/
>> <http://wso2.com/signature>
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
>
> Best Regards,
>
> Nuwandi Wickramasinghe
>
> Software Engineer
>
> WSO2 Inc.
>
> Web : http://wso2.com
>
> Mobile : 0719214873
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to