The default behavior of concurrency control is to expire the original session. However, I would like to block the second user which is logging in with the same credentials with
The solution is in the documentation:
Often you would prefer to prevent a second login, in which case you can use
... The second login will then be rejected. By “rejected”, we mean that the user will be sent to the
authentication-failure-url
if form-based login is being used. If the second authentication takes place through another non-interactive mechanism, such as “remember-me”, an “unauthorized” (402) error will be sent to the client. If instead you want to use an error page, you can add the attributesession-authentication-error-url
to thesession-management
element.
So basically set error-if-maximum-exceeded
to "true"
and remove expired-url
attribute from
.