O
O
Osklizg2017-08-05 17:05:23
Java
Osklizg, 2017-08-05 17:05:23

How to make an authorization page?

With the help of Spring Security, I made authorization: I registered it in application.properties:

security.user.name = user
security.user.password = password
(now when you visit localhost, a pop-up window appears in the browser).
Actually the question is, if I have an authorization page written in html / css, can I somehow replace the pop-up window with this page?
PS
In this case, I don't care that there will be only one user and there will be no database binding

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Kosarev, 2017-08-07
@Osklizg

In the configuration, you need to enable form authorization:

@Configuration
    public class WebSecurityConfig extends WebSecurityConfigurerAdapter {

        @Override
        protected void configure(HttpSecurity http) throws Exception {
            http
                //твои
                //настройки
                .formLogin();
        }
    }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question