- Add missing changes.
This commit is contained in:
@@ -18,11 +18,9 @@
|
||||
|
||||
package com.wisemapping.model;
|
||||
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import java.io.Serializable;
|
||||
import java.util.*;
|
||||
|
||||
@XmlRootElement(name = "user")
|
||||
public class User
|
||||
extends Collaborator
|
||||
implements Serializable {
|
||||
|
@@ -17,12 +17,12 @@ public class AuthenticationProvider implements org.springframework.security.auth
|
||||
|
||||
private PasswordEncoder encoder;
|
||||
|
||||
@Override
|
||||
@Override()
|
||||
public Authentication authenticate(@NotNull final Authentication auth) throws AuthenticationException {
|
||||
|
||||
// All your user authentication needs
|
||||
|
||||
final String email = auth.getName();
|
||||
|
||||
final User user = userManager.getUserBy(email);
|
||||
final String credentials = (String) auth.getCredentials();
|
||||
if (user == null || credentials == null || !encoder.isPasswordValid(user.getPassword(), credentials, null)) {
|
||||
|
@@ -2,6 +2,7 @@ package com.wisemapping.test.model;
|
||||
|
||||
|
||||
import com.wisemapping.rest.model.RestMindmap;
|
||||
import com.wisemapping.rest.model.RestUser;
|
||||
import org.codehaus.jackson.map.DeserializationConfig;
|
||||
import org.codehaus.jackson.map.ObjectMapper;
|
||||
import org.testng.annotations.Test;
|
||||
@@ -13,10 +14,14 @@ public class JsonTest {
|
||||
|
||||
@Test
|
||||
void deserialize() throws IOException {
|
||||
String json = "{\"id\":\"1\",\"xml\":\"<map name=\\\"1\\\" version=\\\"tango\\\"><topic central=\\\"true\\\" text=\\\"ss\\\" id=\\\"1\\\"/></map>\",\"properties\":\"{\\\"zoom\\\":0.85}\"}";
|
||||
String mapJson = "{\"id\":\"1\",\"xml\":\"<map name=\\\"1\\\" version=\\\"tango\\\"><topic central=\\\"true\\\" text=\\\"ss\\\" id=\\\"1\\\"/></map>\",\"properties\":\"{\\\"zoom\\\":0.85}\"}";
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
final RestMindmap restMindmap = mapper.readValue(json, RestMindmap.class);
|
||||
final RestMindmap restMindmap = mapper.readValue(mapJson, RestMindmap.class);
|
||||
|
||||
String userJson = "{\"username\":\"admin\",\"email\":\"admin@wisemapping.org\",\"tags\":[],\"creationDate\":1329706800000,\"firstname\":\"Wise\",\"lastname\":\"test\",\"password\":\"test\"}";
|
||||
final RestUser restUser = mapper.readValue(userJson, RestUser.class);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@@ -14,7 +14,7 @@ activationCode BIGINT NOT NULL,
|
||||
activation_date DATE,
|
||||
allowSendEmail CHAR(1) NOT NULL,
|
||||
FOREIGN KEY(colaborator_id) REFERENCES colaborator(id)
|
||||
) ;
|
||||
);
|
||||
|
||||
CREATE TABLE MINDMAP (
|
||||
id INTEGER NOT NULL IDENTITY,
|
||||
|
Reference in New Issue
Block a user