Enhance token authentication mechanism - #229
Conversation
BobAnkh
left a comment
There was a problem hiding this comment.
Let's first align the following things and then I will review the rest of the code. Also, please update all relevant documents.
c6443db to
f717f4a
Compare
f717f4a to
a55e7c8
Compare
|
@BobAnkh I have removed the custom serde functions and now worker's lifetime is default to |
BobAnkh
left a comment
There was a problem hiding this comment.
Need to improve the credential system. We might wait for the feature of address storage cred system to merge together.
d8f3851 to
a8f502e
Compare
d88aefa to
3b79f2d
Compare
| self.rewrite(&origin, username, None).await | ||
| } | ||
|
|
||
| async fn read( |
There was a problem hiding this comment.
This function is a little bit weird and needs modification.
There was a problem hiding this comment.
We might need some discussion on that before any changes are taken.
| } | ||
|
|
||
| if new_lines.is_empty() { | ||
| tokio::fs::remove_file(&self.credential_path).await?; |
There was a problem hiding this comment.
Maybe we doesn't need to remove the file. We could just keep it empty, so just use the original code we already have in our modify_or_append_credential function, that is, write the content joined by "\n", as in your else block.
1880901 to
ea700a1
Compare
Co-authored-by: un-lock-able <gaogao174561@outlook.com>
Co-authored-by: un-lock-able <gaogao174561@outlook.com> Co-authored-by: BobAnkh <bobankhshen@gmail.com>
ea700a1 to
0712a3f
Compare
This PR adds two new features:
refreshcommand to request a new token, arevokecommand to revoke all tokens.