- 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)) {
|
||||
|
Reference in New Issue
Block a user