From b8828f76cbf017c47f3a5f17ae759d2ab8c9c4d0 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Mon, 20 Aug 2018 15:23:30 -0500 Subject: [PATCH 1/2] adds support for the nokia health mate api --- internal/token.go | 1 + nokiahealth/nokiahealth.go | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 nokiahealth/nokiahealth.go diff --git a/internal/token.go b/internal/token.go index aeef381a1..5c5451ad8 100644 --- a/internal/token.go +++ b/internal/token.go @@ -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. diff --git a/nokiahealth/nokiahealth.go b/nokiahealth/nokiahealth.go new file mode 100644 index 000000000..883016284 --- /dev/null +++ b/nokiahealth/nokiahealth.go @@ -0,0 +1,16 @@ +// Copyright 2015 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", +} From 6fbdac80b574bdddae2428d0f6a2567d0f97b01e Mon Sep 17 00:00:00 2001 From: Jeremy Date: Tue, 21 Aug 2018 16:02:27 -0500 Subject: [PATCH 2/2] correct copyright to 2018 --- nokiahealth/nokiahealth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nokiahealth/nokiahealth.go b/nokiahealth/nokiahealth.go index 883016284..c181ccd0f 100644 --- a/nokiahealth/nokiahealth.go +++ b/nokiahealth/nokiahealth.go @@ -1,4 +1,4 @@ -// Copyright 2015 The oauth2 Authors. All rights reserved. +// 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.