You can authenticate the user behinds the scenes by setting the UsernamePasswordAuthenticationToken the the security context using SecurityContextHolder.getContext().setAuthentication(..)
You can...
Type: Posts; User: newreaders; Keyword(s):
You can authenticate the user behinds the scenes by setting the UsernamePasswordAuthenticationToken the the security context using SecurityContextHolder.getContext().setAuthentication(..)
You can...
Are you using the same JRE/JDK (version and provider) on both systems?
Just use newline?
From:
<property name="text">
<value><![CDATA[Dear Valued Customer: We received your order<br/>\n\.<br/><br/>If you have any questions, please call us...
If you're using Log4J, you could use NDC or MDC to attache additional information to your log statement without appending the information to the logger yourself.
In your case, I think the session...
You don't need to use AuthenticationManager to authenticate the user programatically, you can just set the UsernamePasswordAuthenticationToken to the security context.
If you really want to use...
You could extend AuthenticationProcessingFilter and overwrite onSuccessfulAuthentication(..) to set the relavant data to the session.
Follow the Reference on how to register the custom filter, see...
You could create a filter that sets the request URL to the HttpRequest. You can then access it when required.
This is also a way to get around the forwarding issue in Web frameworks.
1. Implement your own PersistentTokenRepository and inject it to PersistentTokenBasedRememberMeServices.
2. I doubt you would face any problems with the indexing.
There's a bug raised for this
http://jira.springframework.org/browse/SEC-1081
Is there a work around in the mean time?
Hi
Anyone knows how to set the tokenValiditySeconds to be 30 days, i.e. 2592000 seconds? PersistentTokenBasedRememberMeServices doesn't seem to accept anything more than a day?
Thanks
It's just that there were no coding standards at where I work, so lots of properties have inconsistent names.
So, the first two characters of the property name have to be lower cases?
Thanks.
Hi
Could someone please help me with the following problem?
My command bean:
public class Email implements Serializable {
private String Email;
I have fixed the problem by setting the KeepAsIsErrorCodeConverter.
Thanks
Hi
Could someone please help me find out why bean validation doesn't pickup the message resources I defined in my application context?
My message source declaration:
<bean...
When I manually validate a user I didn't pass in the UserDetails object to the UsernamePasswordAuthenticationToken. :)
All good now, thanks.
Hi
I would like to redirect users to the login page when there is an AuthenticationException in my Struts actions, how can I do this?
Thanks,
Ben
Hi
I just upgraded from Acegi 0.8.0 to 0.9.0, so far things are working great except that when I use the following code:
Authentication auth = (Authentication) request.getUserPrincipal();...
Excellent, exactly what I needed, thanks. :P
Hi
I am using Spring 1.2 and Hibernate 3.0.5.
I would like to evict a collection in a class, how can I do that with HibernateTemplate or in HibernateCallback?
Hibernate's SessionFactoryImpl...
Yeah, why I didn't think about it, acegi is part of Spring afterall and it uses beans. :lol:
Thanks
I would like to use a manager in AuthenticationProcessingFilter, i.e. calling a Spring bean defined in the ApplicationContext.
In normal Filter, I usually use the following code to call a bean:
...
Can I use Acegi with EhCache in a clustered environment? EhCache doesn't support cluster, so should I implement the UserCache to use a cluster-aware caching (TreeCache or Swarmcache)?
Thanks
I passed an encrypted password to the authenticator instead of a plaintext password and as a result I could not access to the restricted pages. Even though I wasn't authenticated, the...
Hi
How can I get the ApplicationContext in AuthenticationProcessingFilter?
Acegi uses IoC container lifecycle services by default so that means it doesn't call the init() and destroy() methods....
Hi
Can I set the order of how beans are initialized?
I have some beans depend on the other beans within the applicationcontext, sometimes I get NullPointerException when I startup my app and...