Skip to content

Commit

Permalink
Merge pull request #704 from okta/bump_java_parent_from_31_to_32
Browse files Browse the repository at this point in the history
Bump `com.okta:okta-parent` from `31` to `32`
  • Loading branch information
arvindkrishnakumar-okta authored Jun 28, 2024
2 parents 5936386 + 5e36af5 commit 8ba3ae8
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
import java.util.Map;
import java.util.stream.Collectors;

import static com.okta.spring.boot.oauth.Okta.statusAsString;

/**
* An {@link AuthenticationEntryPoint} implementation used to commence authentication of protected resource requests
* using {@link BearerTokenAuthenticationFilter}.
Expand Down Expand Up @@ -74,7 +72,7 @@ public Mono<Void> commence(ServerWebExchange exchange, AuthenticationException a
response.setStatusCode(status);

response.getHeaders().setContentType(MediaType.TEXT_PLAIN);
DataBuffer buffer = response.bufferFactory().wrap(statusAsString(status).getBytes(StandardCharsets.UTF_8));
DataBuffer buffer = response.bufferFactory().wrap(Okta.statusAsString(status).getBytes(StandardCharsets.UTF_8));
return response.writeWith(Mono.just(buffer));
});
}
Expand Down
4 changes: 2 additions & 2 deletions oauth2/src/main/java/com/okta/spring/boot/oauth/Okta.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ private static AuthenticationEntryPoint authenticationEntryPoint() {
BearerTokenAuthenticationEntryPoint bearerTokenEntryPoint = new BearerTokenAuthenticationEntryPoint();
return (request, response, authException) -> {
response.setContentType(MediaType.TEXT_PLAIN.toString());
response.getWriter().print(statusAsString(Okta.getStatus(authException)));
response.getWriter().print(statusAsString(getStatus(authException)));
bearerTokenEntryPoint.commence(request, response, authException);
};
}
Expand All @@ -151,4 +151,4 @@ static String statusAsString(HttpStatus status) {
return status.value() + " " + status.getReasonPhrase();
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ private <T> Optional<T> getFieldValue(Object source, String fieldName) throws Il
* To address this, we need this helper method to unset Jwt configurer before attempting to set Opaque Token configuration
* for Root/Org issuer use case.
*/
@SuppressWarnings("PMD.UnusedPrivateMethod")
private void unsetJwtConfigurer(OAuth2ResourceServerConfigurer oAuth2ResourceServerConfigurer) {

AccessController.doPrivileged((PrivilegedAction<Field>) () -> {
Expand Down Expand Up @@ -205,4 +206,4 @@ private OAuth2AccessTokenResponseClient<OAuth2AuthorizationCodeGrantRequest> acc

return accessTokenResponseClient;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
public class OIDCMetadata {

private boolean isAuth0;
private final String clientAuthenticationMethod = "none";
private final String scope = "profile,email,openid";
private static final String clientAuthenticationMethod = "none";
private static final String scope = "profile,email,openid";
private final String jwkSetURI;
private final String authorizationURI;
private final String tokenURI;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ public boolean supportsEventType(Class<? extends ApplicationEvent> eventType) {

@Override
public int getOrder() {
return Ordered.LOWEST_PRECEDENCE;
return LOWEST_PRECEDENCE;
}
}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>com.okta</groupId>
<artifactId>okta-parent</artifactId>
<version>30</version>
<version>32</version>
<relativePath>../okta-java-parent</relativePath>
</parent>

Expand Down

0 comments on commit 8ba3ae8

Please sign in to comment.