-
-
Notifications
You must be signed in to change notification settings - Fork 290
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
Add cognito authentication #340
Conversation
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.
Please add reference docs and sample app.
* @since 2.3 | ||
*/ | ||
@ConfigurationProperties(prefix = "spring.cloud.aws.security.cognito") | ||
public class CognitoAuthenticationProperties { |
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.
nullability annotations are missing. Each package should have package-info.java
marking everything as @NonNull
by default, and all nullable fields, method parameters and return values should be marked with @Nullable
.
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.
TBH right now I don't see value adding those annotations in configuration properties. I agree if those are added in public apis such as *template
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.
If we don't add them, everything is @NonNull
by default. While not such a big deal for Java, when used with Kotlin non-null fields are seen as non-nullable types which can cause very unexpected NPEs in Kotlin Land
...in/java/io/awspring/cloud/autoconfigure/security/CognitoAuthenticationAutoConfiguration.java
Outdated
Show resolved
Hide resolved
...in/java/io/awspring/cloud/autoconfigure/security/CognitoAuthenticationAutoConfiguration.java
Outdated
Show resolved
Hide resolved
...ava/io/awspring/cloud/autoconfigure/security/CognitoAuthenticationAutoConfigurationTest.java
Outdated
Show resolved
Hide resolved
.../src/main/java/io/awspring/cloud/autoconfigure/security/CognitoAuthenticationProperties.java
Outdated
Show resolved
Hide resolved
* Add package-info * Allow to set issuer and registry urls
510a569
to
bb72fcc
Compare
Kudos, SonarCloud Quality Gate passed! |
As far as I can see, we are missing taking into account |
we are not using the cognito sdk here so the use of spring.cloud.aws.endpoint is not something possible. The only way I see is being explicit with the use of registry-url and issuer-url. About the sample. yes, it is pending. |
Closing this due to can be easily autoconfigured using spring boot features
See more here |
@eddumelendez so you're saying that beans that we used to create before |
No description provided.