Skip to content

Commit

Permalink
issue #25 : support layers model
Browse files Browse the repository at this point in the history
  • Loading branch information
OhadR committed Apr 29, 2014
1 parent cdbf482 commit 1399e1f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -320,4 +320,11 @@ public void setEnabled(String userEmail)
{
repository.setEnabled(userEmail);
}


@Override
public Date getPasswordLastChangeDate(String email)
{
return repository.getPasswordLastChangeDate(email);
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.ohadr.auth_flows.interfaces;

import java.util.Date;

import org.apache.commons.lang3.tuple.Pair;

import com.ohadr.auth_flows.types.AccountState;
Expand Down Expand Up @@ -53,6 +55,9 @@ public void sendUnlockAccountMail(String email,
String serverPath);

public void setPassword(String email, String encodedPassword);

Date getPasswordLastChangeDate(String email);


/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ public class RestorePasswordEndpoint extends FlowsEndpointsCommon
{
private static Logger log = Logger.getLogger(RestorePasswordEndpoint.class);

//TODO: use processor to delegate to repo
@Autowired
private AuthenticationAccountRepository repository;


@RequestMapping
public View restorePassword(HttpServletRequest request) throws IOException
Expand Down Expand Up @@ -77,7 +73,7 @@ public View restorePassword(HttpServletRequest request) throws IOException
//we send also the signed-email, so no one can change the email and set-new-password for another user:
String encodedEmailAndTimestamp = FlowsUtil.getParamsUserAndTimestamp(request);

Date lastChange = repository.getPasswordLastChangeDate(extractedData.userEmail);
Date lastChange = processor.getPasswordLastChangeDate(extractedData.userEmail);

Date emailCreationDate = extractedData.emailCreationDate;

Expand Down

0 comments on commit 1399e1f

Please sign in to comment.