Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question Regarding Authentication

 
Sandeep Chhabra
Ranch Hand
Posts: 340
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I got a question while giving javaranch mock exam.


Question Bank ID : 16 Choose the 1 correct answer
Which of the following is correct html for 'Form Based Authentication"?



<form method="post" action="security_check">
<input type="text" name="username">
<input type="password" name="password">
</form>


<form method="post" action="j_security_check">
<input type="text" name="j_username">
<input type="password" name="j_password">
</form>


<form method="post" action="your login page">
<input type="text" name="j_username">
<input type="password" name="j_password">
</form>


<form method="post" action="your login page">
<input type="text" name="username">
<input type="password" name="password">
</form>


It has been asked to choose 1 correct answer. Hence I chose the 4th option.
But i want to know that why 3rd option is wrong.

I feel it should be right, since the name of input type can be anything, even j_username and j_password when we are using FORM based authentication.

Kindly clarify!

Thanks
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Option 2 is correct. The form action must be j_security_check for the form based auth.

Thanks
 
Sandeep Chhabra
Ranch Hand
Posts: 340
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Right...
My mistake..
Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic