|
@@ -1,5 +1,5 @@
|
|
|
/*
|
|
|
- * Copyright 2002-2020 the original author or authors.
|
|
|
+ * Copyright 2020-2021 the original author or authors.
|
|
|
*
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
* you may not use this file except in compliance with the License.
|
|
@@ -13,7 +13,6 @@
|
|
|
* See the License for the specific language governing permissions and
|
|
|
* limitations under the License.
|
|
|
*/
|
|
|
-
|
|
|
package org.springframework.security.oauth2.server.authorization.jackson2;
|
|
|
|
|
|
import java.util.Collections;
|
|
@@ -24,7 +23,6 @@ import com.fasterxml.jackson.databind.module.SimpleModule;
|
|
|
|
|
|
import org.springframework.security.jackson2.SecurityJackson2Modules;
|
|
|
import org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest;
|
|
|
-import org.springframework.security.oauth2.server.authorization.authentication.OAuth2ClientAuthenticationToken;
|
|
|
|
|
|
/**
|
|
|
* Jackson {@code Module} for {@code spring-authorization-server}, that registers the
|
|
@@ -34,7 +32,6 @@ import org.springframework.security.oauth2.server.authorization.authentication.O
|
|
|
* <li>{@link UnmodifiableMapMixin}</li>
|
|
|
* <li>{@link HashSetMixin}</li>
|
|
|
* <li>{@link OAuth2AuthorizationRequestMixin}</li>
|
|
|
- * <li>{@link OAuth2ClientAuthenticationTokenMixin}</li>
|
|
|
* </ul>
|
|
|
*
|
|
|
* If not already enabled, default typing will be automatically enabled as type info is
|
|
@@ -43,21 +40,23 @@ import org.springframework.security.oauth2.server.authorization.authentication.O
|
|
|
*
|
|
|
* <pre>
|
|
|
* ObjectMapper mapper = new ObjectMapper();
|
|
|
- * mapper.registerModule(new OAuth2ServerJackson2Module());
|
|
|
+ * mapper.registerModule(new OAuth2AuthorizationServerJackson2Module());
|
|
|
* </pre>
|
|
|
*
|
|
|
+ * <b>NOTE:</b> Use {@link SecurityJackson2Modules#getModules(ClassLoader)} to get a list
|
|
|
+ * of all security modules.
|
|
|
+ *
|
|
|
* @author Steve Riesenberg
|
|
|
* @since 0.1.2
|
|
|
* @see SecurityJackson2Modules
|
|
|
* @see UnmodifiableMapMixin
|
|
|
* @see HashSetMixin
|
|
|
* @see OAuth2AuthorizationRequestMixin
|
|
|
- * @see OAuth2ClientAuthenticationTokenMixin
|
|
|
*/
|
|
|
-public class OAuth2ServerJackson2Module extends SimpleModule {
|
|
|
+public class OAuth2AuthorizationServerJackson2Module extends SimpleModule {
|
|
|
|
|
|
- public OAuth2ServerJackson2Module() {
|
|
|
- super(OAuth2ServerJackson2Module.class.getName(), new Version(1, 0, 0, null, null, null));
|
|
|
+ public OAuth2AuthorizationServerJackson2Module() {
|
|
|
+ super(OAuth2AuthorizationServerJackson2Module.class.getName(), new Version(1, 0, 0, null, null, null));
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -67,7 +66,6 @@ public class OAuth2ServerJackson2Module extends SimpleModule {
|
|
|
UnmodifiableMapMixin.class);
|
|
|
context.setMixInAnnotations(HashSet.class, HashSetMixin.class);
|
|
|
context.setMixInAnnotations(OAuth2AuthorizationRequest.class, OAuth2AuthorizationRequestMixin.class);
|
|
|
- context.setMixInAnnotations(OAuth2ClientAuthenticationToken.class, OAuth2ClientAuthenticationTokenMixin.class);
|
|
|
}
|
|
|
|
|
|
}
|