I am using Zencoder to trancode our media and reading about notifications. In the article, there’s a block of code that looks like:
"notifications": [
{"format": "xml", "url": "http://user:password@example.com/zencoder1"},
{"format": "json", "url": "http://user:password@example.com/zencoder2"},
"http://example.com/zencoder3",
"admin@example.com"
]
Which basically tells Zencoder to send notifications via url and/or email. If Zencoder sends a notification to:
{"format": "xml", "url": "http://username:password@localhost:3000/zencoder/notification"}
How can I make my Zencoder controller, notification action react to user:password? If I browse to “http://username:password@localhost:3000/zencoder/notification” Firefox throws a message:
Confirm
You are about to log in to the site
“localhost” with the username “username”, but
the website does not require
authentication. This may be an attempt
to trick you.Is “localhost” the site you want to
visit?
Ideally, in Zencoder#notification, I would like to parse through username and password. How can this be done?
I found the solution. It’s just basic HTTP Basic Auth. Solution can be viewed here and here.