bootstrap modal as the login page for spring security -
in web app, have login/registration part bootstrap modals appears when login icon in header clicked. i'm trying configure in spring security, see have return page in config method:
@override protected void configure(httpsecurity http) throws exception { http .formlogin().loginpage("/login") .and() ... }
my question how implement modal login page instead of full html page. i'm using spring mvc 4 spring security 4 , thymeleaf
edit: in header in html pages:
<div class="col-xs-7 col-sm-4"> <div class="top-social-last top-dark pull-right" data-toggle="tooltip" data-placement="bottom" title="login/register"> <a class="top-icon-circle" href="#login-modal" data-toggle="modal"> <i class="fa fa-lock"></i> </a> </div> <!-- social icons --> </div>
this header , modal implementaion shared fragment included in pages (long code modal didn't copy here).
now there requests requires login have add login page in security config these requests should redirected to, don't have page, have modal shared fragment among pages. think i'm not doing right, if can please show me how work modals in spring security.
for example, in airbnb site, if want advertisement , not logged in, modal pops instead of redirecting page
you have create login modal in bootstrap , show when click on login button. login modal should contain standard login form in <form>
tags. after clicking submit button form should redirect user th:action="@{/j_spring_security_check}"
, that's all.
Comments
Post a Comment