Skip to content
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

Fix password in xml body #58

Merged
merged 14 commits into from
Aug 20, 2024
Merged

Fix password in xml body #58

merged 14 commits into from
Aug 20, 2024

Conversation

giantcroc
Copy link
Contributor

As crowd api shows, the request body should be

<?xml version="1.0" encoding="UTF-8"?>
<password>
  <value>Password</value>
</password>

instead of

<?xml version="1.0" encoding="UTF-8"?>
<passwordValue>
  <value>Password</value>
</passwordValue>

@andyone andyone changed the base branch from master to develop August 20, 2024 09:59
@@ -121,11 +121,11 @@ func (api *API) GetUser(userName string, withAttributes bool) (*User, error) {
// Login attempts to authenticate a user with the given username and password.
// It constructs a URL with the given username and sends a POST request to the usermanagement authentication API with the provided password.
// It returns a pointer to a User object with the user's information on successful authentication, or an error if authentication failed or an unknown error occurred.
func (api *API) Login(userName, password string) (*User, error) {
func (api *API) Login(userName, passWord string) (*User, error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is unrelated to the issue, please do not change the naming of function arguments.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, but the argument password is same with type password struct, and it should be same form with userName.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, thanks.

@andyone
Copy link
Member

andyone commented Aug 20, 2024

Hi! Thank you for your contribution. Please take a look at the review comments.

@andyone andyone self-assigned this Aug 20, 2024
@andyone andyone merged commit 8359133 into essentialkaos:develop Aug 20, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants