Subversion Repositories SmartDukaan

Rev

Rev 3269 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3269 Rev 3390
Line 1... Line 1...
1
/**
1
/**
2
 * 
2
 * 
3
 */
3
 */
4
package in.shop2020.serving.controllers;
4
package in.shop2020.serving.controllers;
5
 
5
 
-
 
6
import in.shop2020.thrift.clients.CRMClient;
-
 
7
 
6
import org.apache.shiro.SecurityUtils;
8
import org.apache.shiro.SecurityUtils;
7
import org.apache.shiro.crypto.hash.Sha256Hash;
9
import org.apache.shiro.crypto.hash.Sha256Hash;
8
import org.apache.struts2.convention.annotation.Result;
10
import org.apache.struts2.convention.annotation.Result;
9
import org.apache.thrift.TException;
11
import org.apache.thrift.TException;
10
 
12
 
Line 22... Line 24...
22
 
24
 
23
    private String password; 
25
    private String password; 
24
 
26
 
25
    public String updatePassword() throws TException
27
    public String updatePassword() throws TException
26
    {
28
    {
27
        createServiceClients();
29
        crmServiceClient = new CRMClient().getClient();
28
        crmServiceClient.updatePasswordForAgent(currentAgentEmailId, new Sha256Hash(password).toHex());
30
        crmServiceClient.updatePasswordForAgent(currentAgentEmailId, new Sha256Hash(password).toHex());
29
        addActionMessage("Password changed successfully!");
31
        addActionMessage("Password changed successfully!");
30
        return INPUT;
32
        return INPUT;
31
    }
33
    }
32
 
34