Skip to content

Commit 63fe76e

Browse files
authored
Release 1.12.0 (#489)
- update versions. - update CHANGELOG. - update unit test for oauth with mocked HMAC. Resolves: OLPEDGE-2622 Signed-off-by: Oleksii Zubko <ext-oleksii.zubko@here.com>
1 parent 737212c commit 63fe76e

File tree

9 files changed

+57
-15
lines changed

9 files changed

+57
-15
lines changed

@here/olp-sdk-authentication/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@here/olp-sdk-authentication",
3-
"version": "1.11.0",
3+
"version": "1.12.0",
44
"description": "Wrapper around the HERE Authentication and Authorization REST API obtaining short-lived access tokens that are used to authenticate requests to HERE services.",
55
"main": "index.js",
66
"browser": "index.web.js",
@@ -49,7 +49,7 @@
4949
},
5050
"license": "Apache-2.0",
5151
"dependencies": {
52-
"@here/olp-sdk-core": "^1.6.0",
52+
"@here/olp-sdk-core": "^1.7.0",
5353
"@here/olp-sdk-fetch": "^1.9.0",
5454
"properties-reader": "^0.3.1"
5555
},

@here/olp-sdk-authentication/test/OAuth.test.ts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@
1717
* License-Filename: LICENSE
1818
*/
1919

20+
import sinon = require("sinon");
2021
import * as chai from "chai";
2122
import { requestToken, Token, UserAuth } from "../index";
22-
23+
import * as crypto from "crypto";
2324
import { HttpError, SENT_WITH_PARAM } from "@here/olp-sdk-core";
2425
import fetchMock = require("fetch-mock");
2526
import { loadCredentialsFromFile } from "../lib/loadCredentialsFromFile";
@@ -61,6 +62,12 @@ describe("oauth-request", function() {
6162
});
6263

6364
describe("oauth-request-offline", function() {
65+
let sandbox: sinon.SinonSandbox;
66+
67+
before(function() {
68+
sandbox = sinon.createSandbox();
69+
});
70+
6471
const mock_token = "eyJhbGciOiJSUzUxMiIsImN0eSI6IkpXVCIsIm";
6572
const mock_id = "mock-id";
6673
const mock_scrt = "mock-str";
@@ -79,10 +86,17 @@ describe("oauth-request-offline", function() {
7986

8087
afterEach(function() {
8188
fetchMock.reset();
89+
sandbox.restore();
8290
});
8391

8492
// tslint:disable-next-line: only-arrow-functions
8593
it("SHA-256 to sign token requests", async function() {
94+
const mockedOauthSignature = "mocked_oauth_signature";
95+
sandbox.stub(crypto, "createHmac").returns(({
96+
update: sandbox.stub(),
97+
digest: sandbox.stub().returns(mockedOauthSignature)
98+
} as unknown) as crypto.Hmac);
99+
86100
const result = await requestToken({
87101
consumerKey: "mocked-key",
88102
secretKey: "mocked-secret",
@@ -94,7 +108,7 @@ describe("oauth-request-offline", function() {
94108

95109
const options: RequestInit & any = fetchMock.calls()[0][1];
96110
expect(options.headers.get("Authorization")).to.be.equal(
97-
`OAuth oauth_consumer_key="mocked-key",oauth_nonce="mocked-nonce",oauth_signature_method="HMAC-SHA256",oauth_timestamp="1550777140",oauth_version="1.0",oauth_signature="PVYijMWSDplONd9abHA8rx3OuHB7NkxfQqE2jw3I%2FE0%3D"`
111+
`OAuth oauth_consumer_key="mocked-key",oauth_nonce="mocked-nonce",oauth_signature_method="HMAC-SHA256",oauth_timestamp="1550777140",oauth_version="1.0",oauth_signature="${mockedOauthSignature}"`
98112
);
99113
});
100114

@here/olp-sdk-core/lib.version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
* License-Filename: LICENSE
1818
*/
1919

20-
export const LIB_VERSION = "1.11.1";
20+
export const LIB_VERSION = "1.12.0";

@here/olp-sdk-core/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@here/olp-sdk-core",
3-
"version": "1.6.1",
3+
"version": "1.7.0",
44
"description": "Core features of the HERE Data Platform",
55
"main": "index.js",
66
"browser": "index.web.js",
@@ -50,7 +50,7 @@
5050
"license": "Apache-2.0",
5151
"dependencies": {
5252
"@here/olp-sdk-fetch": "^1.9.0",
53-
"@here/olp-sdk-dataservice-api": "^1.11.0"
53+
"@here/olp-sdk-dataservice-api": "^1.12.0"
5454
},
5555
"devDependencies": {
5656
"@types/chai": "^4.2.7",

@here/olp-sdk-dataservice-api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@here/olp-sdk-dataservice-api",
3-
"version": "1.11.0",
3+
"version": "1.12.0",
44
"description": "Generated from the OpenAPI specification of the HERE Open Location Platform Data API",
55
"main": "index.js",
66
"typings": "index",

@here/olp-sdk-dataservice-read/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@here/olp-sdk-dataservice-read",
3-
"version": "1.11.0",
3+
"version": "1.12.0",
44
"description": "Wrapper around a subset of the HERE Open Location Platform Data REST API related to reading data from OLP catalogs",
55
"main": "index.js",
66
"browser": "index.web.js",
@@ -49,8 +49,8 @@
4949
},
5050
"license": "Apache-2.0",
5151
"dependencies": {
52-
"@here/olp-sdk-core": "^1.6.0",
53-
"@here/olp-sdk-dataservice-api": "^1.11.0",
52+
"@here/olp-sdk-core": "^1.7.0",
53+
"@here/olp-sdk-dataservice-api": "^1.12.0",
5454
"@here/olp-sdk-fetch": "^1.9.0"
5555
},
5656
"devDependencies": {

@here/olp-sdk-dataservice-write/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@here/olp-sdk-dataservice-write",
3-
"version": "1.6.1",
3+
"version": "1.7.0",
44
"description": "Wrapper around a subset of the HERE Open Location Platform Data REST API related to writing data to OLP catalogs",
55
"main": "index.js",
66
"browser": "index.web.js",
@@ -50,8 +50,8 @@
5050
},
5151
"license": "Apache-2.0",
5252
"dependencies": {
53-
"@here/olp-sdk-core": "^1.6.0",
54-
"@here/olp-sdk-dataservice-api": "^1.11.0",
53+
"@here/olp-sdk-core": "^1.7.0",
54+
"@here/olp-sdk-dataservice-api": "^1.12.0",
5555
"@here/olp-sdk-fetch": "^1.9.0"
5656
},
5757
"devDependencies": {

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
1+
## v1.12.0 (30/08/2021)
2+
3+
**olp-sdk-core**
4+
5+
- Updated the `@here/olp-sdk-dataservice-api` dependency.
6+
7+
**olp-sdk-authentication**
8+
9+
- Removed the deprecated code (https://github.com/heremaps/here-data-sdk-typescript/pull/485).
10+
- Updated the `@here/olp-sdk-core` dependency.
11+
12+
**olp-sdk-dataservice-api**
13+
14+
- Updated the generated code for `ConfigAPI` with information on the `InteractiveMap` and `ObjectStore` layer types.
15+
- Updated the `date` types for the `Schema`, `Artifact`, and `KeysListObjectItemResponse` interfaces of `ArtifactAPI`.
16+
- Removed the deprecated code (https://github.com/heremaps/here-data-sdk-typescript/pull/485).
17+
18+
**olp-sdk-dataservice-read**
19+
20+
- Removed the deprecated code (https://github.com/heremaps/here-data-sdk-typescript/pull/485).
21+
- Updated the `@here/olp-sdk-core` dependency.
22+
- Updated the `@here/olp-sdk-dataservice-api` dependency.
23+
24+
**olp-sdk-dataservice-write**
25+
26+
- Updated the `@here/olp-sdk-core` dependency.
27+
- Updated the `@here/olp-sdk-dataservice-api` dependency.
28+
129
## v1.11.1 (17/06/2021)
230

331
**olp-sdk-dataservice-write**

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@here/olp-sdk-ts",
3-
"version": "1.11.0",
3+
"version": "1.12.0",
44
"description": "HERE OLP SDK for TypeScript",
55
"author": {
66
"name": "HERE Europe B.V.",

0 commit comments

Comments
 (0)