1.14. OAuth2 Spring Security - amresh087/Question GitHub Wiki
Spring boot Security
https://github.com/amresh087/imageRepo/blob/master/spring%20securty.pdf
OAuth 2.0
- OAuth 2.0 is the industry-standard protocol for authorization. OAuth 2.0 focuses on client developer simplicity while providing specific authorization flows for web applications
When we are implementing OAuth 2.0 then there are three component
AuthenticationServer
ResourceOwnerUser
ResourceServer
In AuthenticationServer, we need to defend two config files
OAuth2AuthorizationServerConfig.java
In ResourceOwnerUser,
we need to create User and Roles classes with Many to Many relation and expose Api like UserResource.java
ResourceServer
Now final we need to create ResourceServer.
In controller we need to create end point by using @PreAuthorize
. . . . . .. . . . . . ..