-
-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spring Boot Security: OAuth 2.0 and OpenID Connect #443
Spring Boot Security: OAuth 2.0 and OpenID Connect #443
Conversation
Codecov Report
@@ Coverage Diff @@
## main #443 +/- ##
============================================
Coverage 100.00% 100.00%
- Complexity 1279 1309 +30
============================================
Files 240 247 +7
Lines 3988 4114 +126
Branches 71 71
============================================
+ Hits 3988 4114 +126
Continue to review full report at Codecov.
|
@pblanchardie : my suggestion would be to focus on 1 use case per PR. I mean:
It's better for reviews and simpler to implement I think |
@pascalgrimaud yes it will be simpler for both of us, I updated the description accordingly and will remove the code for these options. |
addClient simply adds dependencies and configuration for a provider, and you can add multiple ones (eg. facebook, github, google on a public app). Not sure you want to keep this this API. I can also remove it and only keep addDefault. it works well as is, so should we proceed with SecurityConfiguration and Account related stuff in another PR? |
I'd like to know how it can be tested manually ? |
Simply add an hello world restcontroller with 1 requestmapping which returns hello and it works like a charm :) |
Maybe missing Keycloak Docker Compose ? |
yes, will add Keycloak Docker Compose. |
8c23cc4
to
c931df6
Compare
@pascalgrimaud still some informative TODOs |
Agree with your TODO, excepting:
As the security part is complex, I'd prefer to keep all code completely separated. |
c931df6
to
029e17e
Compare
@pascalgrimaud weird build error! |
@pblanchardie : related to #468 -> can you update your branch plz? |
|
||
@Operation(summary = "Add Spring Security default login with OAuth2") | ||
@ApiResponse(responseCode = "500", description = "An error occurred while adding Spring Security default login with OAuth2") | ||
@PostMapping("/oauth2/default") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"default" => "full" means Client + Login (for frontend) + Server (for service).
Which options to provide?
eg.
- full
- login-only (for a monolith that does not expose its API)
- service-only (for web services, microservice)
I didn't forget this PR. |
@pblanchardie : I'll work on this branch today. I'll refresh it and start adding OAuth2 files |
Hi @pascalgrimaud ! Good news thx for the update. Tell me if you need anything. |
…n-overriding to true
It's ready for review. About account, I'll do this work in another PR |
...lite/generator/server/springboot/mvc/security/oauth2/domain/OAuth2SecurityDomainService.java
Outdated
Show resolved
Hide resolved
...ver/springboot/mvc/security/oauth2/src/infrastructure/config/AudienceValidator.java.mustache
Outdated
Show resolved
Hide resolved
.../springboot/mvc/security/oauth2/src/infrastructure/config/CustomClaimConverter.java.mustache
Outdated
Show resolved
Hide resolved
.../springboot/mvc/security/oauth2/src/infrastructure/config/CustomClaimConverter.java.mustache
Outdated
Show resolved
Hide resolved
thanks for the review @Bolo89 |
fixes #270
.csrf()
)