Gemini Community Support Site

This Gemini community support site can be used to find solutions to product issues. You can log in using Open Id, Google Profile and even Facebook. Feel free to ask a question or browse FAQs and documentation. Product tour videos are also available along with how-to videos demonstrating key Gemini capabilities.




How to authenticate with Gemini Web Services (not using .NET)

api

I call Gemini Web Service using XMLHttpRequest object. The authentication with Gemini Web Services succeeded with gemini-username-token and gemini-api-token HTTP Headers set but it failed when
gemini-username-token and gemini-password-token HTTP Headers were set. Is this combination supported ?

The user name was Base64 encoded. The password was first MD5 hashed and then Base64 encoded. I received response: Method requires authentication. Forbidden.

Any ideas where I am going wrong?

amir
· 1
amir
Replies (4)
helpful
0
not helpful

Which version of Gemini? It should work with 3.6.3.
What is the string you send when the password is admin?


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

Tried with 3.6.3 version.

When the password is admin

MD5 hash: 21232f297a57a5a743894a0e4a801fc3

Base64Encode result: MjEyMzJmMjk3YTU3YTVhNzQzODk0YTBlNGE4MDFmYzM=

The last string was set as HTTP gemini-password-token Header.

The service called is "Create Issue Comment".


amir
· 1
amir
helpful
0
not helpful

That doesn't look right to me, it should be:ISMvKXpXpadDiUoOSoAfww==

Are you base64 the byte array or a string?

See this: http://pajhome.org.uk/crypt/md5/instructions.html (http://pajhome.org.uk/crypt/md5/jshash-2.2.zip) and set it to strict RFC compliance:

var b64pad  = "=";  /* base-64 pad character. "=" for strict RFC compliance   */


Saar Cohen
· 5000
Saar Cohen
helpful
0
not helpful

The instructions on the recommended link were helpful, finally the authentication succeeded.

Thank you for your support !


amir
· 1
amir