Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Add Check and Change Password for an Account (#2861)
Browse files Browse the repository at this point in the history
* Added new RPC endpoints to JSAPI (#2389)

* Added modal in Account Page to test & modify password (#2389)

* Modify hint with password change // Better tabs (#2556)
  • Loading branch information
ngotchac authored and gavofyork committed Oct 25, 2016
1 parent e71c752 commit 2d2e9c4
Show file tree
Hide file tree
Showing 9 changed files with 550 additions and 10 deletions.
10 changes: 10 additions & 0 deletions js/src/api/rpc/personal/personal.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ export default class Personal {
.execute('personal_confirmRequest', inNumber16(requestId), options, password);
}

changePassword (account, password, newPassword) {
return this._transport
.execute('personal_changePassword', inAddress(account), password, newPassword);
}

generateAuthorizationToken () {
return this._transport
.execute('personal_generateAuthorizationToken');
Expand Down Expand Up @@ -105,6 +110,11 @@ export default class Personal {
.execute('personal_signerEnabled');
}

testPassword (account, password) {
return this._transport
.execute('personal_testPassword', inAddress(account), password);
}

unlockAccount (account, password, duration = 1) {
return this._transport
.execute('personal_unlockAccount', inAddress(account), password, inNumber10(duration));
Expand Down
17 changes: 17 additions & 0 deletions js/src/modals/PasswordManager/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright 2015, 2016 Ethcore (UK) Ltd.
// This file is part of Parity.

// Parity is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Parity is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.

export default from './passwordManager.js';
73 changes: 73 additions & 0 deletions js/src/modals/PasswordManager/passwordManager.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/* Copyright 2015, 2016 Ethcore (UK) Ltd.
/* This file is part of Parity.
/*
/* Parity is free software: you can redistribute it and/or modify
/* it under the terms of the GNU General Public License as published by
/* the Free Software Foundation, either version 3 of the License, or
/* (at your option) any later version.
/*
/* Parity is distributed in the hope that it will be useful,
/* but WITHOUT ANY WARRANTY; without even the implied warranty of
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
/* GNU General Public License for more details.
/*
/* You should have received a copy of the GNU General Public License
/* along with Parity. If not, see <http://www.gnu.org/licenses/>.
*/

.accountContainer {
display: flex;
flex-direction: row;
margin-bottom: 1.5rem;
}

.accountInfos {
display: flex;
flex-direction: column;
justify-content: space-around;
}

.accountInfos > * {
margin: 0.25rem 0;
}

.hintLabel {
text-transform: uppercase;
font-size: 0.7rem;
margin-right: 0.5rem;
}

.accountAddress {
font-family: monospace;
font-size: 0.9rem;
}

.accountName {
font-size: 1.1rem;
}

.passwordHint {
font-size: 0.9rem;
color: lightgrey;
}

.message {
margin-top: 1rem;
width: 100%;
height: 2.5rem;
text-align: center;
line-height: 2.5rem;
transition: height 350ms 0 !important;
overflow: hidden;
}

.hideMessage {
height: 0;
background-color: transparent !important;
}

.form {
margin-top: 0;
padding: 0 0.5rem 1rem;
background-color: rgba(255, 255, 255, 0.05);
}
Loading

0 comments on commit 2d2e9c4

Please sign in to comment.