Thursday, August 28, 2014

Panda::APIError: NotAuthorized: Account with access key does not exist

Do anyone frustrated because of the NotAuthorized issue?

1.9.2-p320 :001 > Panda::Profile.all

Panda::APIError: NotAuthorized: Account with access key <<key>> does not exist

If you are setting the PandaStream Add ons through heruku document (https://devcenter.heroku.com/articles/pandastream), Please make sure you create an account in http://www.pandastream.com/ to get you access key and secret key. 

NOTE : PandaStream access key and secret key are different from Amazon S3 access key and secret key.


Notes from https://www.pandastream.com/docs/integrate_with_rails

Configuration

First you must log in to your account where you can find your credentials as follows:
  • Under Api Access: Access key, Secret key, API URL
  • After selecting your Cloud: Cloud ID

Notes from https://www.pandastream.com/docs/api#api_authentication

The Panda API requires all requests must also be signed to ensure they are valid and authenticated. For GET and DELETE requests the additional parameters must be url encoded and added to the parameters in the url. When making a POST or PUT request they should be included in the usual parameters payload submitted.
The access_key and secret_key used to authenticate the request are provided when you sign up for your Panda account. Your keys can always be found by logging in to your account by visiting pandastream.com


Friday, August 1, 2014

autocomplete="off" is not working in chrome

This is one simple issue drove me crazy all afternoon...

I want to ignore the browser autofill option to save the password. Like, sometimes user select the option to save password for the website and Chrome just autofills the password for the user. But, the same machine can be used by multiple users. So you might want to protect the user password, even through user selects to save the password by mistake.

I started searching the solution in Google and I tried, autocomplete="off" for the <input />, it doesn't work, then someone in another post suggested, it will work only if you add autocomplete="off" to the <form /> tag.

Guess what? It didn't work. Since chrome is just ignoring the autocomplete="off" option.

I found a workaround to solve this issue. 

"Chrome autofill the password <input /> tag and the previous <input /> tag. 
So , I added 

<input style="display:none" />
<input type="password" style="display:none" />

It works like a charm. Autofill goes to these <input /> tag, which will not display and the real one works as expected.