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

appsecret_proof for server API calls #1

Merged
merged 3 commits into from
Jun 4, 2017

Conversation

calvinchengx
Copy link
Contributor

Implement hmac sha256 function to create appsecret_proof so that we can make server API calls securely

accountKit.go Outdated
@@ -42,9 +45,13 @@ func NewAccountKit(appID, appSecret string) *AccountKit {
}
}

func (a *AccountKit) VerifyByToken(token string) (*Profile, error) {
func (a *AccountKit) VerifyByToken(userAccessToken string, accountKitAppSecret string) (*Profile, error) {
Copy link
Owner

Choose a reason for hiding this comment

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

thanks for submitting pr.

just one quick question: what is difference between this accountKitAppSecret and the one existing AppSecret?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@hsinhoyeh yes, you are right. We do not need to pass in the accountKitAppSecret again, it can already be retrieved via a.AppSecret. Resolved.

@calvinchengx
Copy link
Contributor Author

@hsinhoyeh all good to go with this PR?

Cheers,
C

@hsinhoyeh
Copy link
Owner

hsinhoyeh commented Jun 4, 2017

looks good, I am going to merge it, thanks 👍

@hsinhoyeh hsinhoyeh merged commit cf8b8f5 into hsinhoyeh:master Jun 4, 2017
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.

None yet

2 participants