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

Changes the return type of the client method RetreiveUserAction #74

Closed
wants to merge 1 commit into from

Conversation

calwd
Copy link

@calwd calwd commented May 14, 2023

I noticed that when I tried to import the package into my go project I was getting the following error:


# github.com/FusionAuth/go-client/pkg/fusionauth
../../../go/pkg/mod/github.com/!fusion!auth/[email protected]/pkg/fusionauth/Client.go:4437:81: undefined: UserinfoResponse
../../../go/pkg/mod/github.com/!fusion!auth/[email protected]/pkg/fusionauth/Client.go:4438:11: undefined: UserinfoResponse

So, I pulled down the source code for the project and noticed that the client method RetrieveUserInfoFromAccessToken was creating an error in compiling and testing.

Specifically, the method was trying to return a type called UserInfoResponse, but that struct does not exist in the client or domain files. So, I pulled the code history and noticed that the method previously returned a pointer to a UserResponse struct. I changed the return type to the UserResponse struct, tested the code out and it seemed to work.

Fixes #72

@robotdan
Copy link
Member

This was a bug in the API def, UserinfoResponse is the correct type.

@robotdan
Copy link
Member

For now I removed the API that uses that object in the client. I don't know if there is aw ay to map LinkedHashMap<String, Object> into Go - I think it would be map[string]interface{}, but I can't get the domain to compile.

@robotdan robotdan closed this May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

compilation error: fusionauth/Client.go:4637:81: undefined: UserinfoResponse
3 participants