Skip to content

nokiehealth: add endpoint for Nokia Health Mate #315

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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions internal/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ var brokenAuthHeaderProviders = []string{
"https://multisport.todaysplan.com.au/rest/oauth/access_token",
"https://whats.todaysplan.com.au/rest/oauth/access_token",
"https://stackoverflow.com/oauth/access_token",
"https://account.health.nokia.com",
}

// brokenAuthHeaderDomains lists broken providers that issue dynamic endpoints.
Expand Down
16 changes: 16 additions & 0 deletions nokiahealth/nokiahealth.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Copyright 2018 The oauth2 Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// Package nokiahealth provides constants for using OAuth2 to access the Nokia Health Mate API.
package nokiahealth

import (
"golang.org/x/oauth2"
)

// Endpoint is Nokia Health Mate's OAuth 2.0 endpoint.
var Endpoint = oauth2.Endpoint{
AuthURL: "https://account.health.nokia.com/oauth2_user/authorize2",
TokenURL: "https://account.health.nokia.com/oauth2/token",
}