Hi, Optionally, can you try with below command format and check,
curl --user Client_Id:Client_Secret -k -d "grant_type=password&username=admin&password=admin" -H "Content-Type:application/x-www-form-urlencoded" https://localhost:9443/oauth2/token Thanks, Pushpalanka. -- Pushpalanka Jayawardhana, B.Sc.Eng.(Hons). Senior Software Engineer, WSO2 Lanka (pvt) Ltd; wso2.com/ Mobile: +94779716248 Blog: pushpalankajaya.blogspot.com/ | LinkedIn: lk.linkedin.com/in/pushpalanka/ | Twitter: @pushpalanka On Wed, Oct 7, 2015 at 5:40 PM, Sachith Punchihewa <sachi...@wso2.com> wrote: > Hi, > I am currently using a locally build of IS Server from the latest > code.When i try to get a OAuth Access token via a curl execution i am > getting an error. > > Curl Format used : > > *curl**<SPACE>**-k**<SPACE>**-d**<SPACE>* >> *"grant_type=password&username=userNamepasswork&=**passWord* >> *&tenantDomain=carbon.super"**<SPACE>**-H**<SPACE>**"Authorization:Basic* >> *<SPACE>**Base 64 encoded clientID:clientSecret,**<SPACE>**Content-Type:* >> *<SPACE>**application/x-www-form-urlencoded"**<SPACE>**https://localhost:9443/oauth2/token >> <https://localhost:9443/oauth2/token>* > > > Actual command : > > curl -k -d >> "grant_type=password&username=xxxxx&password=xxxxx&tenantDomain=carbon.super" >> -H "Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, >> Content-Type: application/x-www-form-urlencoded" >> https://localhost:9443/oauth2/token > > > Error : > > "Error decoding authorization header. Space delimited \"<authMethod> >> <base64Hash>\" format violated." > > > > Is there is a issue with the curl command i am using here ? > > Thanks and Regards. > Kamidu Sachith Punchihewa > *Software Engineer* > WSO2, Inc. > lean . enterprise . middleware > Mobile : +94 (0) 770566749 <%2B94%20%280%29%20773%20451194> > > > Disclaimer: This communication may contain privileged or other > confidential information and is intended exclusively for the addressee/s. > If you are not the intended recipient/s, or believe that you may have > received this communication in error, please reply to the sender indicating > that fact and delete the copy you received and in addition, you should not > print, copy, retransmit, disseminate, or otherwise use the information > contained in this communication. Internet communications cannot be > guaranteed to be timely, secure, error or virus-free. The sender does not > accept liability for any errors or omissions. > > _______________________________________________ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > >
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev