SpringBoot Security by Basic Authentication

Опубликовано: 22 Май 2026
на канале: Rabi Sankar Podder
199
2

SpringBoot Security by Basic Authentication
url :: https://github.com/djrabi007/springbo...


What is Spring Authentication ?
1. How to Secure REST API using Basic Authentication and Authorization
2. Develop microservice and implement security(SpringBoot+Spring Security)
3. SpringBoot Provided Default Security Login...
• Need to mention username and password in *.properties
• Default Login will be provided by the Spring Boot!!!

1. Authentication from *.Properties File
2. Secure Any (Auth and NoAuth Url )
If You need Role Based Security or Particular Function...
• e.g Few API/Function/Operation is accessed by Admin only...
• Few API/Operation is accessed by User only
• Role/URL Based Security..i.e. Customized Security config
• You can make authentication using Database.....Here I am using inmemory authentication....
Password require for Any URL ("Roddur/p")
• Auth : "http://localhost:8080/auth/getMsg" (Need to give Username/password) Secure
• No Auth: http://localhost:8080/noAuth/getMsg (......DO.....................................)secure

3. Secure AUTH url only
Password require for Auth Only!!
• Auth : "http://localhost:8080/auth/getMsg" (Need to give Username/password) Secure
• No Auth: http://localhost:8080/noAuth/getMsg (......NO NEED!!!..........) NOT secure