Polish gh-11758
This commit is contained in:
+5
-5
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2024 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.
|
||||
@@ -29,15 +29,15 @@ import org.springframework.security.web.authentication.switchuser.SwitchUserGran
|
||||
* Jackson mixin class to serialize/deserialize {@link SwitchUserGrantedAuthority}.
|
||||
*
|
||||
* @author Markus Heiden
|
||||
* @since 5.8
|
||||
* @since 6.3
|
||||
* @see WebServletJackson2Module
|
||||
* @see org.springframework.security.jackson2.SecurityJackson2Modules
|
||||
*/
|
||||
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY)
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS)
|
||||
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE,
|
||||
isGetterVisibility = JsonAutoDetect.Visibility.NONE)
|
||||
public abstract class SwitchUserGrantedAuthorityMixIn {
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
abstract class SwitchUserGrantedAuthorityMixIn {
|
||||
|
||||
@JsonCreator
|
||||
SwitchUserGrantedAuthorityMixIn(@JsonProperty("role") String role, @JsonProperty("source") Authentication source) {
|
||||
|
||||
+7
-7
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2015-2016 the original author or authors.
|
||||
* Copyright 2015-2024 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.
|
||||
@@ -27,12 +27,12 @@ import org.springframework.security.web.savedrequest.DefaultSavedRequest;
|
||||
import org.springframework.security.web.savedrequest.SavedCookie;
|
||||
|
||||
/**
|
||||
* Jackson module for spring-security-web related to servlet. This module register
|
||||
* {@link CookieMixin}, {@link SavedCookieMixin}, {@link DefaultSavedRequestMixin} and
|
||||
* {@link WebAuthenticationDetailsMixin}. If no default typing enabled by default then
|
||||
* it'll enable it because typing info is needed to properly serialize/deserialize
|
||||
* objects. In order to use this module just add this module into your ObjectMapper
|
||||
* configuration.
|
||||
* Jackson module for spring-security-web related to servlet. This module registers
|
||||
* {@link CookieMixin}, {@link SavedCookieMixin}, {@link DefaultSavedRequestMixin},
|
||||
* {@link WebAuthenticationDetailsMixin}, and {@link SwitchUserGrantedAuthorityMixIn}. If
|
||||
* no default typing is enabled by default then it will be enabled, because typing info is
|
||||
* needed to properly serialize/deserialize objects. In order to use this module just add
|
||||
* this module into your ObjectMapper configuration.
|
||||
*
|
||||
* <pre>
|
||||
* ObjectMapper mapper = new ObjectMapper();
|
||||
|
||||
Reference in New Issue
Block a user