-
- Downloads
fix: provide factory method for jackson to deserialize authorities
@JsonProperty won't work with the abstract '? extends GrantedAuthority' type, as Jackson doesn't have a constructor or factory to convert a string into a concrete implementation. This change adds a factory method which takes a Collection<String> (which Jackson can understand) and uses Spring Security's utility method to convert the Collection of Strings to a Collection of GrantedAuthority instances. Note: the 'Amy Administrator' user provided by the 'local-users.json|yaml' file is no longer strictly equivalent to those provided in 'local-users.properties'. See adi-ia/uw-spring-security#5; correcting that seems to be outside of the scope of a bugfix, as it will result in something that likely requires a new feature release.
Showing
- uw-spring-security-core/src/main/java/edu/wisc/uwss/UWUserDetailsImpl.java 29 additions, 9 deletions...y-core/src/main/java/edu/wisc/uwss/UWUserDetailsImpl.java
- uw-spring-security-core/src/main/resources/edu/wisc/uwss/local/local-users.json 1 addition, 1 deletion...e/src/main/resources/edu/wisc/uwss/local/local-users.json
- uw-spring-security-core/src/main/resources/edu/wisc/uwss/local/local-users.yaml 2 additions, 1 deletion...e/src/main/resources/edu/wisc/uwss/local/local-users.yaml
- uw-spring-security-core/src/test/java/edu/wisc/uwss/local/LocalUserDetailsManagerImplTest.java 10 additions, 0 deletions.../edu/wisc/uwss/local/LocalUserDetailsManagerImplTest.java
Loading
Please register or sign in to comment