Skip to content

Commit 9b7a110

Browse files
author
Steve Riesenberg
committed
Fix OAuth2AuthenticationExceptionMixinTests on JDK 17
Closes gh-11893
1 parent ce012a4 commit 9b7a110

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/jackson2/OAuth2AuthenticationExceptionMixin.java

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -30,16 +30,23 @@
3030
* {@link OAuth2AuthenticationException}.
3131
*
3232
* @author Dennis Neufeld
33+
* @author Steve Riesenberg
3334
* @since 5.3.4
3435
* @see OAuth2AuthenticationException
3536
* @see OAuth2ClientJackson2Module
3637
*/
3738
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS)
38-
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE,
39+
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.NONE, getterVisibility = JsonAutoDetect.Visibility.NONE,
3940
isGetterVisibility = JsonAutoDetect.Visibility.NONE)
4041
@JsonIgnoreProperties(ignoreUnknown = true, value = { "cause", "stackTrace", "suppressedExceptions" })
4142
abstract class OAuth2AuthenticationExceptionMixin {
4243

44+
@JsonProperty("error")
45+
abstract OAuth2Error getError();
46+
47+
@JsonProperty("detailMessage")
48+
abstract String getMessage();
49+
4350
@JsonCreator
4451
OAuth2AuthenticationExceptionMixin(@JsonProperty("error") OAuth2Error error,
4552
@JsonProperty("detailMessage") String message) {

0 commit comments

Comments
 (0)