0

I have added spring security dependencies in pom file. So whenever i will start my application it will start with spring security login page. But i want to remove the login page without removing the pom dependencies. Even i do not want to replace the default Spring security login page with my custom login page. Is there any way?

xash
  • 3,702
  • 10
  • 22
Sumit Trivedi
  • 113
  • 1
  • 1
  • 9
  • What is it that your **really** want to achieve. YOu still want the login page but also want to remove it. Which is weird... SO what is it you really want . – M. Deinum Dec 23 '20 at 07:53
  • Does this answer your question? [How to disable spring-security login screen?](https://stackoverflow.com/questions/23636368/how-to-disable-spring-security-login-screen) – Kumar Ashutosh Dec 23 '20 at 09:53
  • "Form-based login or HTTP Basic security (depending on the Accept header in the request) for the entire application (including actuator endpoints if actuator is on the classpath).". To disable the login there are various ways, either by disabling autoconfiguration or by disabling http basic in WebSecurityConfigadapter. – Kumar Ashutosh Dec 23 '20 at 09:59
  • @Sumit Please add more information of your design. Do you want to remove login page because (a) you have a login form in every page (in the header perhaps), (b) you have a pre-authentication filter that allows users to get in, or (c) you don't have any authentication and you just want any user to access the application without a login page? – Ritesh Dec 24 '20 at 14:57

1 Answers1

-1

you can add the below in properties or yaml file which one you use,

security.basic.enabled=false

prostý člověk
  • 909
  • 11
  • 29
  • disabling basic authentication to remove the form login page won't help. Those are different authentication mechanism. – M. Deinum Dec 23 '20 at 07:53