-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
session-proxy for delegate signing and key storage #1655
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, I like the design. 💪
credentials: SessionProxyCredentials<BalanceOf<T>>, | ||
) -> DispatchResultWithPostInfo { | ||
let delegator = ensure_signed(origin)?; | ||
ensure!(delegator != delegate, Error::<T>::NoSelfProxy); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably better to call it SelfProxyForbidden
let signer = self.delegate.clone().unwrap_or(self.getter.sender_account().clone()); | ||
if self.signature.verify(encoded.as_slice(), &signer) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let signer = self.delegate.clone().unwrap_or(self.getter.sender_account().clone()); | |
if self.signature.verify(encoded.as_slice(), &signer) { | |
let signer = self.delegate.as_ref().unwrap_or(self.getter.sender_account()); | |
if self.signature.verify(encoded.as_slice(), signer) { |
let signer = self.delegate.clone().unwrap_or(self.call.sender_account().clone()); | ||
if self.signature.verify(payload.as_slice(), &signer) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let signer = self.delegate.clone().unwrap_or(self.call.sender_account().clone()); | |
if self.signature.verify(payload.as_slice(), &signer) { | |
let signer = self.delegate.as_ref().unwrap_or(self.call.sender_account()); | |
if self.signature.verify(payload.as_slice(), signer) { |
closes #1654
store session key secrets in runtime state and serve them to authenticated owners to allow sessions with less (or no) signing by the owner
send_note
trusted call to allowNonTransfer
proxies to send notesquestion:
session_proxy
may be less intuitive than i.e.delegates
. it works very different from frame pallet proxy