This repository was archived by the owner on Jan 23, 2025. It is now read-only.
Add endpoints to rotate password and API key#39
Merged
Conversation
dentarg
reviewed
Oct 7, 2023
| if err != nil { | ||
| return err | ||
| } | ||
| if response.StatusCode != 204 { |
Contributor
There was a problem hiding this comment.
Might make sense to future proof here and allow response code 200 as success too
I recall someone asking for the password/key to be part of the reply when they rotate, and "204 No Content" wouldn't be suitable if we started doing that.
Contributor
Author
There was a problem hiding this comment.
Any idea on how we want the response body if we choose to add password/apikey in the response?
Contributor
Author
There was a problem hiding this comment.
Examples
- string
{ "password": "<password>" },{ "apikey": "<apikey>"{ "result": "<password/apikey>" }
Contributor
There was a problem hiding this comment.
I don't know :) I was thinking we don't need to know it here right now?
Contributor
Author
There was a problem hiding this comment.
Heh :) Now I get what you talked about.
Not sure now how and if the content will be returned as response from rotate password or apikey. Just make sure we can handle status code 200 if we choose to return rotated password or apikey.
dentarg
approved these changes
Oct 26, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WHY are these changes introduced?
Endpoints that support to rotate password and API key for an account.
Trello
Require fix: https://github.com/84codes/account-console/pull/56
WHAT is this pull request doing?