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

Maybe sub_error and not scope? #5

Open
Delgus opened this issue Apr 20, 2021 · 1 comment
Open

Maybe sub_error and not scope? #5

Delgus opened this issue Apr 20, 2021 · 1 comment

Comments

@Delgus
Copy link

Delgus commented Apr 20, 2021

@Delgus
Copy link
Author

Delgus commented Apr 20, 2021

You can use embedded structures for response too

type authResponse struct {
	authInfo
	authError
}

type authInfo struct {
	AccessToken string `json:"access_token"`
	ExpiresIn   int    `json:"expires_in"`
	TokenType   string `json:"token_type"`
}

type authError struct {
	SubError         int    `json:"sub_error"`
	Error            int    `json:"error"`
	ErrorDescription string `json:"error_description"`
}

it's a good practice

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

No branches or pull requests

1 participant