-
Notifications
You must be signed in to change notification settings - Fork 3
0.6.1/Auth Client #6
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
Conversation
Signed-off-by: LingKa <[email protected]>
Signed-off-by: LingKa <[email protected]>
Signed-off-by: LingKa <[email protected]>
Signed-off-by: LingKa <[email protected]>
Signed-off-by: LingKa <[email protected]>
Signed-off-by: LingKa <[email protected]>
Signed-off-by: LingKa <[email protected]>
Signed-off-by: LingKa <[email protected]>
Signed-off-by: LingKa <[email protected]>
Signed-off-by: iGxnon <[email protected]>
Signed-off-by: iGxnon <[email protected]>
Signed-off-by: iGxnon <[email protected]>
| public AuthenticateResponse authenticate(AuthenticateRequest req) throws InvalidProtocolBufferException, CommandExecutionException { | ||
| RequestWithToken reqToken = RequestWithToken.newBuilder().setToken(this.token).setAuthenticateRequest(req).build(); | ||
| Command cmd = Command.newBuilder().setRequest(reqToken).build(); | ||
| CommandResponse resp = this.curpClient.propose(cmd, false); | ||
| return resp.getAuthenticateResponse(); | ||
| } |
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.
The authenticate operation does need to set token.
| public AuthUserGetResponse userGet(AuthUserGetRequest req) throws InvalidProtocolBufferException, CommandExecutionException { | ||
| RequestWithToken reqToken = RequestWithToken.newBuilder().setToken(this.token).setAuthUserGetRequest(req).build(); | ||
| Command cmd = Command.newBuilder().setRequest(reqToken).build(); | ||
| CommandResponse resp = this.curpClient.propose(cmd, false); |
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.
userGet and roleGet could use fast path.
| return resp.getAuthenticateResponse(); | ||
| } | ||
|
|
||
| public AuthUserAddResponse userAdd(AuthUserAddRequest req) throws InvalidProtocolBufferException, CommandExecutionException { |
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.
Please hash the password in userAdd and userChangePassword
|
Close because unused, see #7 |
Base on #5
Please briefly answer these questions:
Add auth client
Add auth client
No