Subversion Repositories SmartDukaan

Rev

Rev 3390 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3390 Rev 5053
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.serving.auth.CRMAuthorizingRealm;
6
import in.shop2020.thrift.clients.CRMClient;
7
import in.shop2020.thrift.clients.CRMClient;
7
 
8
 
8
import org.apache.shiro.SecurityUtils;
9
import org.apache.shiro.SecurityUtils;
9
import org.apache.shiro.crypto.hash.Sha256Hash;
10
import org.apache.shiro.crypto.hash.Sha256Hash;
10
import org.apache.struts2.convention.annotation.Result;
11
import org.apache.struts2.convention.annotation.Result;
Line 27... Line 28...
27
    public String updatePassword() throws TException
28
    public String updatePassword() throws TException
28
    {
29
    {
29
        crmServiceClient = new CRMClient().getClient();
30
        crmServiceClient = new CRMClient().getClient();
30
        crmServiceClient.updatePasswordForAgent(currentAgentEmailId, new Sha256Hash(password).toHex());
31
        crmServiceClient.updatePasswordForAgent(currentAgentEmailId, new Sha256Hash(password).toHex());
31
        addActionMessage("Password changed successfully!");
32
        addActionMessage("Password changed successfully!");
-
 
33
 
-
 
34
        // Dummy call to reload agents
-
 
35
        CRMAuthorizingRealm.getAgent(-1);
32
        return INPUT;
36
        return INPUT;
33
    }
37
    }
34
 
38
 
35
    public String logout()
39
    public String logout()
36
    {
40
    {