I'am trying to get request an access token using grant_type=password with curl from wso2 API Manager. But I seems to me that every time I use a username with a Capital letter I get the error: {"error":"invalid_grant","error_description":"Provided Authorization Grant is invalid."}
and when I use a username with out lowercase letters I get: {"token_type":"bearer","expires_in":3600,"refresh_token":"a819b019c4aa925f127788526bc13851","access_token":"6f760484acafdf03e8371825e3cb656"}
Compare the following:
1.
curl -k -d "grant_type=password&username=david&password=Abc123&scope=PRODUCTION" -H "Authorization: Basic SlJXbVRoNmNaMDJGM1ZIYlZ6bW9XeUt0WnRJYTpnRVdzd2ZYTmJJMmJXUXc4ekJWVEw1b0VkU0Fh, Content-Type: application/x-www-form-urlencoded" https://localhost:9443/oauth2/token
2.
curl -k -d "grant_type=password&username=David&password=Abc123&scope=PRODUCTION" -H "Authorization: Basic V2ZsQnhGeDlFUzVwaVZuOXFEdlF5bWxuZEM4YTp4SnZNQTNCOHFud0N1MXZ1YTNvaGg3VF9mbkFh, Content-Type: application/x-www-form-urlencoded" https://localhost:9443/oauth2/token
Both users: - exist - can log in to localhost:9443/store/ - Has created an application with an API subscription
The only difference between them is that 2. has a capital letter. So my question is am I doing something wrong or is this a bug?