Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maximum concurrent users in Spring Security

I am using Spring Security 3.0 in my project and I am restricting user to have maximum one session. Configuration is given below :

<security:session-management>
            <security:concurrency-control error-if-maximum-exceeded="true" max-sessions="1"/>
</security:session-management>

I want to print the custom message(not default provided by spring) when maximum sessions are reached. Please help.

Thanks in advance!!

like image 359
Nandkumar Tekale Avatar asked Dec 30 '11 10:12

Nandkumar Tekale


1 Answers

Please keep this in your messages.properties

ConcurrentSessionControlStrategy.exceededAllowed=This account is already using by someone.

it will display "This account is already using by someone." you can give what ever you want.

Also don't forget to config Resourcebundle

like image 153
Basavaraju Avatar answered Sep 29 '22 21:09

Basavaraju