Start a Conversation

This post is more than 5 years old

Solved!

Go to Solution

1582

June 18th, 2012 16:00

How to verify user crdentials

I use the Java binding for the Atmos REST API. My tool allows users to enter their atmos credentials in order to access their storage. I'd like to verify that the credentials have been entered correctly (so the user can correct them if not).

Which API call is suitable to do this? It should be inexpensive, always fail with wrong credentials, and always succeed with correct credentials.

Thanks,

Carsten

222 Posts

June 18th, 2012 17:00

The lowest overhead call that also exercises the Atmos authentication process is getServiceInformation(). 

3 Posts

June 18th, 2012 17:00

My fault. Seems just adding "!!" in front of the secret does not invalidate it. With a completely bogus secret I indeed get rejected.

3 Posts

June 18th, 2012 17:00

Hi rbala,

thanks, but getServiceInformation() returns the same value with correct and incorrect credentials, so I can't use it to verify.

Carsten

222 Posts

June 18th, 2012 17:00

getServiceInformation() should fail if you use incorrect credentials.  You should receive this error for an incorrect UID:

          1033

          Unable to retrieve the secret key for the specified user.

281 Posts

June 18th, 2012 19:00

Yes, the secret key is a base-64 encoded value so the ! character is ignored.

No Events found!

Top