Saturday, December 13, 2008

OpenID: Simple Registration Extension with Joid

Having trouble implementing simple registration extension on joid?. This simple tutorial explains how to hack your way into getting simple registration extension working without using the API.


Simple registration works by passing parameters specifying the required and optional attributes required by the relying party in the authentication url passed to the provider. Joid does a great job creating the authentication url using the OpenIdFilter.joid().getAuthUrl() funtion. You would need append parameters to the generated authentication url inorder to specify that you would be using simple registration extension. The parameter openid.ns.sreg with the value http://openid.net/extensions/sreg/1.1 specifies that you will be using simple registration extension version 1.1. The two additional parameters that specify the attributes that are required and optional are openid.sreg.required and openid.sreg.optional respectively.

The final url would look something like the below
Joid Generated Authentication URL + "&openid.ns.sreg=http://openid.net/extensions/sreg/1.1&openid.sreg.
required=fullname,email&openid.sreg.optional=gender,nickname"


Once the provider authenticates the request, it will pass the extension parameters back to the relying party as request parameters. Now comes the tricky part. This request will be intercepted by the OpenID filter that you have configured in you web descriptor. This filter does not acquire the extension parameters and does a lot joid specific mumbo jumbo. After this, the user will be redirected resulting in the loss of the extension parameters.


A way around this is to create your own filter class that stores the extension parameters in the session and passes the control to the OpenId filter. Edit your web descriptor so that this filter will be called instead of the OpenId filter. I've created a class called Interceptor (code below) which does just that. Use the parameters in the session to satisfy your business requirements.

public class Interceptor implements Filter {

public void init(FilterConfig filterConfig) throws ServletException
{
call OpenId Filter's init function here ... passing filterconfig
}

public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse,FilterChain filterChain) throws IOException, ServletException
{
store extension parameters here
call OpenId Filter's do Filter function with all the required parameters
}

}


Thanks to restafarian blog for the url trick :-)

Monday, December 1, 2008

Smiley in the Sky

Guess what I found in the sky when I came back home from a hard day's work...







http://www.foxnews.com/story/0,2933,459428,00.html
http://www.news.com.au/heraldsun/gallery/0,22010,5036117-5006020,00.html

Sunday, August 31, 2008

Sunday, July 13, 2008

Paid so less to Do so much ?

I got an interview call this Friday from a fairly reputed anti virus company. Their job profile goes something like this -

-------------------------------------------------------------------------------------------------
* Strong knowledge of the Windows Operating System (file system, registry, network
configuration, security, etc.)
* Basic proficiency in a programming language (such as C or C++)
* Very good knowledge on x86 Assembly Instructions and Reverse Engineering
* Virus analysis knowledge is essential
* Good understanding of various File formats such as PE, NE, OLE, ELF,etc.
* Network protocols (TCP/IP, UDP, FTP, HTTP, ICMP, etc);
* Knowledge about Disassemblers and Debuggers such as IDAPro, SoftICE, WinDBG
* Self-motivated and adaptable to learning new skills
* Knowledge about Malware Analysis
* Should have the solid understanding of computer virus, exploits, and shell code
* Great passion about researching and reverse engineering malware
* Candidates should have the ability to work in a group of talented virus analysts and
researchers.
* Requires writing virus analyst reports and producing virus signatures.
* This position will be required to perform well under stress in virus emergency response s situations
-------------------------------------------------------------------------------------------------

Okay!... sounds good. The list contains definitely contains some of the things I've tried/done a little for leisure in the past. Its way hardcore that what I'm doing now to make a living. But wait, here's the catch - the pay sucks!. The company is offering me something which is like 50% less than what i get now :-P. I would have settled for the same pay or something slightly lesser than my current pay for the job. I still can't understand why folks in the IT service companies get paid so much when compared to core technology companies where core technical skills are not given "much" emphasis.

Bought a psp

ugh!


Ever since I lost my good old buddy "the ngage" to gravity last year , I wanted to get something to satisfy my cravings as a gamer. I never really considered buying a psp till last month when i happened to see the God Of War PSP video on youtube. It was amazing, definitely something you don't get to see on a hand held gaming device (till recently). Found this shop in Coimbatore selling a second hand psp for 8500 Rs. It came with a 2 gig card as well. It was a pretty good deal as the psp was in 'mint' condition. An another reason why I didn't go for a new one was that there are already rumors of psp2 coming out later this year (as seen on gizmodo) . Maybe I'll buy the new bitch too...

Sunday, June 29, 2008

Songs Im Hooked To

The list is in no particular order


1. God Forbid - "End Of The World"

2. Duran Duran - "Come Undone"

3. Trivium - "Dying in Your Arms"

4. Opeth - "Deliverance"

5. Tool - "Schism"

Saturday, June 28, 2008

Pics again


Peace sells - but who's buying ?
Who wants some ?

The little flower wants to go out and play ! .. awwww


Trash Cans and India


Kid learns to Write

More Photos by me !





Some pictures taken with my beast





Birds are all well

The lads seem to have recovered from their illness which lasted for about a month or so. India is really not an avian friendly place.

Bought a Canon G9

Finally after a big wait, I bought a digital camera - the canon g9 !




Its 12mp with more features that a space shuttle ! ... It cost me about 25,000 rs (thanks dad)
I'm overwhelmed by its engineering. It's gonna take a while to learn all its features.

Started a flickr account - actually two ( don't tell anyone ;-) )

http://flickr.com/photos/alternation
http://www.flickr.com/photos/alternationunlimited

Friday, April 4, 2008

Ike is sick !

The poor lad is in a lot of pain now. He seems to have developed some sort of an infection. Took him to a vet last week( which didn't help much). Planning to take him to an another vet tomorrow. Sadly, its not an avian vet. Avian vets are hard to find in this arm pit of a country :-X




Saturday, March 22, 2008

Got two new birdies - Luna and Ike

Ike

Luna and Tifa

The pair

The flock

Still alive and breathing ...

Its been quite sometime since I've posted anything here. Things are pretty much the same. I'm
still in Coimbatore working as a Java EE programmer. Things are pretty boring as usual...coding and crapping. I'm hardly offline these days (harmless surfing at office... i hate you websense).

Hoping to land into the infosec industry soon ... had made some desperate attempts which actually seem to be working (ugh) . I'm working on a Comptia cert now. I really haven't decided as to when i should take the exam :-| . Being an autodidact has its own share of problems. To help with my work, i bought a laptop (C700). And wow! ... I don't work these days as i'm busy trying to save the city of Neverwinter. Chaos save me...