-
Notifications
You must be signed in to change notification settings - Fork 126
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
update to M2 #1292
update to M2 #1292
Conversation
@sdelamo I have been debugging issues with this PR. The majority of tests are failing because https://ge.micronaut.io/s/nc4ycgxayj3mg/tests/overview?outcome=failed What I have found so far, is when the call reaches @graemerocher has made recent changes around this core code for route expression support. Any ideas? |
this patch fixes it: Index: security-jwt/src/main/java/io/micronaut/security/token/jwt/endpoints/TokenRefreshRequest.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/security-jwt/src/main/java/io/micronaut/security/token/jwt/endpoints/TokenRefreshRequest.java b/security-jwt/src/main/java/io/micronaut/security/token/jwt/endpoints/TokenRefreshRequest.java
--- a/security-jwt/src/main/java/io/micronaut/security/token/jwt/endpoints/TokenRefreshRequest.java (revision 83f4e0261f8c93a1f5a8a7894e714b1ff78f5ebc)
+++ b/security-jwt/src/main/java/io/micronaut/security/token/jwt/endpoints/TokenRefreshRequest.java (date 1681996043487)
@@ -17,6 +17,7 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import io.micronaut.core.annotation.NonNull;
+import io.micronaut.core.annotation.Nullable;
import io.micronaut.serde.annotation.Serdeable;
import jakarta.validation.constraints.NotBlank;
@@ -33,15 +34,15 @@
public static final String GRANT_TYPE_REFRESH_TOKEN = "refresh_token";
- @NonNull
+ @Nullable
@NotBlank
@Pattern(regexp = GRANT_TYPE_REFRESH_TOKEN)
@JsonProperty("grant_type")
private final String grantType;
+ @Nullable
@NotBlank
@JsonProperty(GRANT_TYPE_REFRESH_TOKEN)
- @NonNull
private final String refreshToken;
/**
@@ -49,8 +50,8 @@
* @param grantType Grant type
* @param refreshToken Refresh token
*/
- public TokenRefreshRequest(@NonNull String grantType,
- @NonNull String refreshToken) {
+ public TokenRefreshRequest(@Nullable String grantType,
+ @Nullable String refreshToken) {
this.grantType = grantType;
this.refreshToken = refreshToken;
}
@@ -59,7 +60,7 @@
* grantType getter.
* @return e.g refresh_token
*/
- @NonNull
+ @Nullable
public String getGrantType() {
return grantType;
}
@@ -68,7 +69,7 @@
* refreshToken getter.
* @return e.g. XXXXX
*/
- @NonNull
+ @Nullable
public String getRefreshToken() {
return refreshToken;
} OauthController checks these fields for empty/null and returns the custom error in that case. It looks like the new body binder gives 400 before the controller is ever hit, in the case where these fields are null. So it's just respecting the field annotations. |
SonarCloud Quality Gate failed. |
No description provided.