Skip to content
Snippets Groups Projects
Commit af8d1d27 authored by COLLIN CUDD's avatar COLLIN CUDD
Browse files

Add jackson dependency. Added JsonCreator and JsonProperty annonations to the...

Add jackson dependency.  Added JsonCreator and JsonProperty annonations to the primary constructor for UWUserDetailsImpl.  This gives Jackson the info neccessary to serialize/deserialize UwUserDetailsImpl objects.
parent d3b5ba05
No related branches found
No related tags found
No related merge requests found
...@@ -10,6 +10,10 @@ ...@@ -10,6 +10,10 @@
<description>Core module for UW Spring Security provides the data model for users and implementations of Spring Security interfaces appropriate for UW applications.</description> <description>Core module for UW Spring Security provides the data model for users and implementations of Spring Security interfaces appropriate for UW applications.</description>
<dependencies> <dependencies>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency> <dependency>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId> <artifactId>javax.servlet-api</artifactId>
......
...@@ -12,6 +12,9 @@ import org.springframework.security.core.GrantedAuthority; ...@@ -12,6 +12,9 @@ import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User; import org.springframework.security.core.userdetails.User;
import org.springframework.util.DigestUtils; import org.springframework.util.DigestUtils;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
/** /**
* Implementation of {@link UWUserDetails} returned by the demo services in this package. * Implementation of {@link UWUserDetails} returned by the demo services in this package.
* *
...@@ -54,9 +57,10 @@ public class UWUserDetailsImpl extends User implements UWUserDetails { ...@@ -54,9 +57,10 @@ public class UWUserDetailsImpl extends User implements UWUserDetails {
* @param fullName * @param fullName
* @param uddsMembership * @param uddsMembership
*/ */
public UWUserDetailsImpl(String pvi, String username, String password, @JsonCreator
String fullName, String emailAddress, public UWUserDetailsImpl(@JsonProperty("pvi") String pvi, @JsonProperty("username") String username, @JsonProperty("password") String password,
Collection<String> uddsMembership) { @JsonProperty("fullName") String fullName, @JsonProperty("emailAddress") String emailAddress,
@JsonProperty("uddsMembership") Collection<String> uddsMembership) {
super(username, password, Collections.<GrantedAuthority> emptyList()); super(username, password, Collections.<GrantedAuthority> emptyList());
this.pvi = pvi; this.pvi = pvi;
this.fullName = fullName; this.fullName = fullName;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment