<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Custom AuthenticationProcessingFilter for spring security to perform actions on login</title>
	<atom:link href="http://www.codercorp.com/blog/spring/security-spring/custom-authenticationprocessingfilter-for-spring-security-to-perform-actions-on-login.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.codercorp.com/blog/spring/security-spring/custom-authenticationprocessingfilter-for-spring-security-to-perform-actions-on-login.html</link>
	<description>Everything java</description>
	<lastBuildDate>Wed, 01 Feb 2012 06:25:35 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Norman</title>
		<link>http://www.codercorp.com/blog/spring/security-spring/custom-authenticationprocessingfilter-for-spring-security-to-perform-actions-on-login.html/comment-page-1#comment-817</link>
		<dc:creator>Norman</dc:creator>
		<pubDate>Fri, 28 Oct 2011 14:32:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.codercorp.com/blog/?p=178#comment-817</guid>
		<description>Other option.

http://oajamfibia.wordpress.com/2011/07/07/role-based-login-redirect/#comment-12</description>
		<content:encoded><![CDATA[<p>Other option.</p>
<p><a href="http://oajamfibia.wordpress.com/2011/07/07/role-based-login-redirect/#comment-12" rel="nofollow">http://oajamfibia.wordpress.com/2011/07/07/role-based-login-redirect/#comment-12</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gaurav Arora</title>
		<link>http://www.codercorp.com/blog/spring/security-spring/custom-authenticationprocessingfilter-for-spring-security-to-perform-actions-on-login.html/comment-page-1#comment-816</link>
		<dc:creator>Gaurav Arora</dc:creator>
		<pubDate>Fri, 28 Oct 2011 10:30:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.codercorp.com/blog/?p=178#comment-816</guid>
		<description>Glad to be of help. Wish I was still working with Spring and could help more.</description>
		<content:encoded><![CDATA[<p>Glad to be of help. Wish I was still working with Spring and could help more.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kiyoko Stanifer</title>
		<link>http://www.codercorp.com/blog/spring/security-spring/custom-authenticationprocessingfilter-for-spring-security-to-perform-actions-on-login.html/comment-page-1#comment-815</link>
		<dc:creator>Kiyoko Stanifer</dc:creator>
		<pubDate>Fri, 28 Oct 2011 01:20:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.codercorp.com/blog/?p=178#comment-815</guid>
		<description>Nice read, I just passed this onto a colleague who was doing some research on that. And he actually bought me lunch as I found it for him smile Therefore let me rephrase that: Thanks for lunch! &quot;For most of history, Anonymous was a woman.&quot; by Virginia Woolf.</description>
		<content:encoded><![CDATA[<p>Nice read, I just passed this onto a colleague who was doing some research on that. And he actually bought me lunch as I found it for him smile Therefore let me rephrase that: Thanks for lunch! &#8220;For most of history, Anonymous was a woman.&#8221; by Virginia Woolf.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NaiveGeek</title>
		<link>http://www.codercorp.com/blog/spring/security-spring/custom-authenticationprocessingfilter-for-spring-security-to-perform-actions-on-login.html/comment-page-1#comment-622</link>
		<dc:creator>NaiveGeek</dc:creator>
		<pubDate>Thu, 01 Apr 2010 21:51:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.codercorp.com/blog/?p=178#comment-622</guid>
		<description>Hey Gurav, 
 Thanks for the info posted. It explained lot clearly and helped me successfully accomplish my task
Naive Geek</description>
		<content:encoded><![CDATA[<p>Hey Gurav,<br />
 Thanks for the info posted. It explained lot clearly and helped me successfully accomplish my task<br />
Naive Geek</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andi</title>
		<link>http://www.codercorp.com/blog/spring/security-spring/custom-authenticationprocessingfilter-for-spring-security-to-perform-actions-on-login.html/comment-page-1#comment-514</link>
		<dc:creator>Andi</dc:creator>
		<pubDate>Mon, 21 Sep 2009 10:16:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.codercorp.com/blog/?p=178#comment-514</guid>
		<description>Hi!
I have the same problem. It works only for filters=&quot;none&quot;, but then the redirect to https (reqires-channel=&quot;https&quot;) doesn&#039;t work... Any idea?</description>
		<content:encoded><![CDATA[<p>Hi!<br />
I have the same problem. It works only for filters=&#8221;none&#8221;, but then the redirect to https (reqires-channel=&#8221;https&#8221;) doesn&#8217;t work&#8230; Any idea?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fuz</title>
		<link>http://www.codercorp.com/blog/spring/security-spring/custom-authenticationprocessingfilter-for-spring-security-to-perform-actions-on-login.html/comment-page-1#comment-507</link>
		<dc:creator>Fuz</dc:creator>
		<pubDate>Wed, 02 Sep 2009 19:04:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.codercorp.com/blog/?p=178#comment-507</guid>
		<description>Great stuff!
everything almost works! but look at this:

here you wrote filters=&quot;none&quot;. if you replace this with access=&quot;IS_AUTHENTICATED_ANONYMOUSLY&quot; browser goes to unstoppable redirecting. do you know what is it?
Also spring security error handling dissapeared - server HTTP Status 401 error page now appears.</description>
		<content:encoded><![CDATA[<p>Great stuff!<br />
everything almost works! but look at this:</p>
<p>here you wrote filters=&#8221;none&#8221;. if you replace this with access=&#8221;IS_AUTHENTICATED_ANONYMOUSLY&#8221; browser goes to unstoppable redirecting. do you know what is it?<br />
Also spring security error handling dissapeared &#8211; server HTTP Status 401 error page now appears.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gaurav Arora</title>
		<link>http://www.codercorp.com/blog/spring/security-spring/custom-authenticationprocessingfilter-for-spring-security-to-perform-actions-on-login.html/comment-page-1#comment-497</link>
		<dc:creator>Gaurav Arora</dc:creator>
		<pubDate>Tue, 18 Aug 2009 05:28:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.codercorp.com/blog/?p=178#comment-497</guid>
		<description>Read &lt;a href=&quot;http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/ch15s09.html&quot; rel=&quot;nofollow&quot;&gt;this link&lt;/a&gt; on an idea of how to handle exceptions globally. This is possibly the easiest way to do it.</description>
		<content:encoded><![CDATA[<p>Read <a href="http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/ch15s09.html" rel="nofollow">this link</a> on an idea of how to handle exceptions globally. This is possibly the easiest way to do it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sunny</title>
		<link>http://www.codercorp.com/blog/spring/security-spring/custom-authenticationprocessingfilter-for-spring-security-to-perform-actions-on-login.html/comment-page-1#comment-496</link>
		<dc:creator>sunny</dc:creator>
		<pubDate>Thu, 13 Aug 2009 17:14:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.codercorp.com/blog/?p=178#comment-496</guid>
		<description>I have customized AuthenticationProcessingFilter for custom authentication. All working fine except, upon the unsuccess authentication, I like to display a custom message. So I am throwing BadCredentialExecption with the custom message. Upong the unsucessfull attempt, it never takes to the login page and never displays custom message. I see all the stacktrace on the page. URL shows j_spring_security_check.

Any idea pls? I appreciate it

	@Override
	protected void onUnsuccessfulAuthentication(HttpServletRequest request,
			HttpServletResponse response, AuthenticationException failed) throws AuthenticationException, IOException
	{
throw new BadCredentialsException(&quot;Log In information not valid: Please enter a valid Username and associated Password.&quot;);
	}</description>
		<content:encoded><![CDATA[<p>I have customized AuthenticationProcessingFilter for custom authentication. All working fine except, upon the unsuccess authentication, I like to display a custom message. So I am throwing BadCredentialExecption with the custom message. Upong the unsucessfull attempt, it never takes to the login page and never displays custom message. I see all the stacktrace on the page. URL shows j_spring_security_check.</p>
<p>Any idea pls? I appreciate it</p>
<p>	@Override<br />
	protected void onUnsuccessfulAuthentication(HttpServletRequest request,<br />
			HttpServletResponse response, AuthenticationException failed) throws AuthenticationException, IOException<br />
	{<br />
throw new BadCredentialsException(&#8220;Log In information not valid: Please enter a valid Username and associated Password.&#8221;);<br />
	}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dario</title>
		<link>http://www.codercorp.com/blog/spring/security-spring/custom-authenticationprocessingfilter-for-spring-security-to-perform-actions-on-login.html/comment-page-1#comment-482</link>
		<dc:creator>Dario</dc:creator>
		<pubDate>Thu, 11 Jun 2009 19:46:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.codercorp.com/blog/?p=178#comment-482</guid>
		<description>the previus post didn&#039;t show the following line 
&quot;  &quot;

after &quot;because for the username I can do &quot;
And before &quot;But because the object &quot;
Sorry for the mess..  :)</description>
		<content:encoded><![CDATA[<p>the previus post didn&#8217;t show the following line<br />
&#8221;  &#8221;</p>
<p>after &#8220;because for the username I can do &#8221;<br />
And before &#8220;But because the object &#8221;<br />
Sorry for the mess..  <img src='http://www.codercorp.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dario</title>
		<link>http://www.codercorp.com/blog/spring/security-spring/custom-authenticationprocessingfilter-for-spring-security-to-perform-actions-on-login.html/comment-page-1#comment-481</link>
		<dc:creator>Dario</dc:creator>
		<pubDate>Thu, 11 Jun 2009 19:43:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.codercorp.com/blog/?p=178#comment-481</guid>
		<description>Hi! thanks for this very usefull tutorial. Anyway reading it, when you say 

&quot;you don’t necessarily need to do all this work just to put your user’s details in the session. You can instead write a custom UserDetailsService which returns an extended User object (or your own implementation of UserDetails) which contains your user details.&quot;

I followed the article and I implemented my UserDetailsService, but now How do I get user details from the session? I mean, in a JSP page how do I get for example the user email? because for the username I can do 

But because the object &quot;Principal&quot; has a method called .getName()
How can I do a similar thing with other user details?

Many thanks in advance for the answer
Dario</description>
		<content:encoded><![CDATA[<p>Hi! thanks for this very usefull tutorial. Anyway reading it, when you say </p>
<p>&#8220;you don’t necessarily need to do all this work just to put your user’s details in the session. You can instead write a custom UserDetailsService which returns an extended User object (or your own implementation of UserDetails) which contains your user details.&#8221;</p>
<p>I followed the article and I implemented my UserDetailsService, but now How do I get user details from the session? I mean, in a JSP page how do I get for example the user email? because for the username I can do </p>
<p>But because the object &#8220;Principal&#8221; has a method called .getName()<br />
How can I do a similar thing with other user details?</p>
<p>Many thanks in advance for the answer<br />
Dario</p>
]]></content:encoded>
	</item>
</channel>
</rss>

