tag:blogger.com,1999:blog-8002601680803116224.post3484068758514215060..comments2023-05-02T11:46:53.727+02:00Comments on Ancient Programming (Old): How to implement basic authentication with acegi - no container dependencyJacob von Eybenhttp://www.blogger.com/profile/05495303543777256635noreply@blogger.comBlogger9125tag:blogger.com,1999:blog-8002601680803116224.post-8524083407324877292008-04-12T08:50:00.000+02:002008-04-12T08:50:00.000+02:00Yeah, that is a very good example. It really helpe...Yeah, that is a very good example. It really helped me out. Thanks!!!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8002601680803116224.post-83772343374199543152008-01-25T15:32:00.000+02:002008-01-25T15:32:00.000+02:00thanks a lotso difficult to find good examples whi...thanks a lot<BR/><BR/>so difficult to find good examples which are complete and which work really, for Spring, AOP, EasyMock, Acegi, etc<BR/><BR/>with your code, at last I could make run a basic Spring program secured with AcegiAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8002601680803116224.post-25594017229602601882007-11-30T14:19:00.000+02:002007-11-30T14:19:00.000+02:00Basic authentication relies on a header called 'Au...Basic authentication relies on a header called 'Authorization' to contain the user credentials and verified on every request.<BR/>When you enters basic-authentication credentials in a browser, the browser remembers the credentials and it will send those along with every request.<BR/><BR/>That is why you won't be prompted for credentials when requesting other pages.<BR/><BR/>The no session setting will not prevent this.Jacob von Eybenhttps://www.blogger.com/profile/05495303543777256635noreply@blogger.comtag:blogger.com,1999:blog-8002601680803116224.post-3354903389430632312007-11-26T18:52:00.000+02:002007-11-26T18:52:00.000+02:00It's me again. I found the problem. It was that in...It's me again. I found the problem. It was that in my SimpleUserDetailsService, I did not give the UserDetails any GrantedAuthorities. Now it works fine. <BR/><BR/>Yet I have another question. As I saw in your securityContext, there should not be any session created. So that every request should be asking the credentials again. Though I disactivated all cookies in IE, I don't get the credential box when I click on links inside my site. Do you know why ?Benoit Sanchezhttps://www.blogger.com/profile/10137482253891407311noreply@blogger.comtag:blogger.com,1999:blog-8002601680803116224.post-61934662231215371182007-11-26T17:49:00.000+02:002007-11-26T17:49:00.000+02:00Hello,Everything works fine, my SimpleUserDetailsS...Hello,<BR/><BR/>Everything works fine, my SimpleUserDetailsService get called, but when I enter the right login and password, I get a NullPointerException from acegi :<BR/><BR/>java.lang.NullPointerException<BR/> at org.acegisecurity.ui.ExceptionTranslationFilter.handleException(ExceptionTranslationFilter.java:229)<BR/> at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:176)<BR/> at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)<BR/> at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:173)<BR/> at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)<BR/> at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)<BR/> at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)<BR/> at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)<BR/> at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)<BR/> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)<BR/> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)<BR/> at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)<BR/> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)<BR/> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)<BR/> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)<BR/> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)<BR/> at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)<BR/> at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)<BR/> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)<BR/> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)<BR/> at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)<BR/> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)<BR/> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)<BR/> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)<BR/> at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)<BR/> at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)<BR/> at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)<BR/> at java.lang.Thread.run(Unknown Source)<BR/><BR/>Can you help me ?Benoit Sanchezhttps://www.blogger.com/profile/10137482253891407311noreply@blogger.comtag:blogger.com,1999:blog-8002601680803116224.post-75300502114420924942007-10-19T11:51:00.000+02:002007-10-19T11:51:00.000+02:00Very helpful, thank you.Very helpful, thank you.Torohttps://www.blogger.com/profile/11195914815962514475noreply@blogger.comtag:blogger.com,1999:blog-8002601680803116224.post-35020311299957673242007-08-27T14:20:00.000+02:002007-08-27T14:20:00.000+02:00I have blogged about a Form Based Acegi Solution ...I have blogged about a <A HREF="http://ancientprogramming.blogspot.com/2007/08/how-to-implement-formbased.html" REL="nofollow"> Form Based Acegi Solution</A> if interested.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8002601680803116224.post-62779995099437472952007-08-17T08:06:00.000+02:002007-08-17T08:06:00.000+02:00I must have zipped without recursion... sorry.It s...I must have zipped without recursion... sorry.<BR/><BR/>It should be working now.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8002601680803116224.post-48164318927934774082007-08-17T07:04:00.000+02:002007-08-17T07:04:00.000+02:00the download is not workingthe download is not workingAnonymousnoreply@blogger.com