Skip to content

Commit 82e4da3

Browse files
authored
Merge pull request #51 from Open-EO/development
Release v2.0.0
2 parents 51d8c05 + 85671b3 commit 82e4da3

18 files changed

+543
-301
lines changed

CHANGELOG.md

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [2.0.0] - 2021-07-06
10+
11+
### Added
12+
13+
- Added events to `Connection` to populate changes for Auth Tokens (`tokenChanged`) and Auth Providers (`authProviderChanged`).
14+
- Added new methods to `Connection` for working with events: `on`, `off` and `emit`.
15+
16+
### Changed
17+
18+
- OpenID Connect authentication has been rewritten.
19+
- Default grant type for OpenID Connect is "AuthCode w/ PKCE" instead of "Implicit".
20+
- Support for OpenID Connect session renewal via refresh tokens.
21+
- Updated STAC support to STAC v1.0.0.
22+
23+
### Removed
24+
25+
- `OidcProvider`: Methods `getGrant`, `getScopes`, `getIssuer` and `getUser` removed. Use the properties `grant`, `scopes`, `issuer` and `user` instead.
26+
- Removed deprecated method `getResultsAsItem` in favor of `getResultsAsStac`.
27+
928
## [1.3.2] - 2021-05-27
1029

1130
### Fixed
@@ -86,13 +105,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
86105

87106
All prior releases have been documented in the [GitHub Releases](https://github.com/Open-EO/openeo-js-client/releases).
88107

89-
[Unreleased]: https://github.com/olivierlacan/keep-a-changelog/compare/v1.3.2...HEAD
90-
[1.3.2]: https://github.com/olivierlacan/keep-a-changelog/compare/v1.3.1...v1.3.2
91-
[1.3.1]: https://github.com/olivierlacan/keep-a-changelog/compare/v1.3.0...v1.3.1
92-
[1.3.0]: https://github.com/olivierlacan/keep-a-changelog/compare/v1.2.0...v1.3.0
93-
[1.2.0]: https://github.com/olivierlacan/keep-a-changelog/compare/v1.1.0...v1.2.0
94-
[1.1.0]: https://github.com/olivierlacan/keep-a-changelog/compare/v1.0.3...v1.1.0
95-
[1.0.3]: https://github.com/olivierlacan/keep-a-changelog/compare/v1.0.2...v1.0.3
96-
[1.0.2]: https://github.com/olivierlacan/keep-a-changelog/compare/v1.0.1...v1.0.2
97-
[1.0.1]: https://github.com/olivierlacan/keep-a-changelog/compare/v1.0.0...v1.0.1
98-
[1.0.0]: https://github.com/olivierlacan/keep-a-changelog/compare/v1.0.0-rc.5...v1.0.0
108+
[Unreleased]: https://github.com/Open-EO/openeo-js-client/compare/v2.0.0...HEAD
109+
[2.0.0]: https://github.com/Open-EO/openeo-js-client/compare/v1.3.2...v2.0.0
110+
[1.3.2]: https://github.com/Open-EO/openeo-js-client/compare/v1.3.1...v1.3.2
111+
[1.3.1]: https://github.com/Open-EO/openeo-js-client/compare/v1.3.0...v1.3.1
112+
[1.3.0]: https://github.com/Open-EO/openeo-js-client/compare/v1.2.0...v1.3.0
113+
[1.2.0]: https://github.com/Open-EO/openeo-js-client/compare/v1.1.0...v1.2.0
114+
[1.1.0]: https://github.com/Open-EO/openeo-js-client/compare/v1.0.3...v1.1.0
115+
[1.0.3]: https://github.com/Open-EO/openeo-js-client/compare/v1.0.2...v1.0.3
116+
[1.0.2]: https://github.com/Open-EO/openeo-js-client/compare/v1.0.1...v1.0.2
117+
[1.0.1]: https://github.com/Open-EO/openeo-js-client/compare/v1.0.0...v1.0.1
118+
[1.0.0]: https://github.com/Open-EO/openeo-js-client/compare/v1.0.0-rc.5...v1.0.0

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
JavaScript/TypeScript client for the openEO API.
44

5-
* [Documentation](https://open-eo.github.io/openeo-js-client/1.3.2/).
5+
* [Documentation](https://open-eo.github.io/openeo-js-client/2.0.0/).
66

7-
The version of this client is **1.3.2** and supports **openEO API versions 1.x.x**.
7+
The version of this client is **2.0.0** and supports **openEO API versions 1.x.x**.
88
Legacy versions are available as releases.
99
See the [CHANGELOG](CHANGELOG.md) for recent changes.
1010

@@ -20,7 +20,7 @@ To use it in a browser environment simply add the following code to your HTML fi
2020
```html
2121
<script src="https://cdn.jsdelivr.net/npm/axios@0.21/dist/axios.min.js"></script>
2222
<script src="https://cdn.jsdelivr.net/npm/oidc-client@1/dist/oidc-client.min.js"></script> <!-- Only required if you'd like to enable authentication via OpenID Connect -->
23-
<script src="https://cdn.jsdelivr.net/npm/@openeo/js-client@1/openeo.min.js"></script>
23+
<script src="https://cdn.jsdelivr.net/npm/@openeo/js-client@2/openeo.min.js"></script>
2424
```
2525

2626
### NodeJS
@@ -53,7 +53,7 @@ In Node.js:
5353
In Typescript:
5454
* [Basic Discovery (promises)](examples/typescript/discovery.ts)
5555

56-
More information can be found in the [documentation](https://open-eo.github.io/openeo-js-client/1.3.2/).
56+
More information can be found in the [documentation](https://open-eo.github.io/openeo-js-client/2.0.0/).
5757

5858
## Development
5959

examples/oidc/openid-connect-popup.html

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,13 @@
77
<meta name="viewport" content="width=device-width, initial-scale=1.0">
88
<script src="https://cdn.jsdelivr.net/npm/axios@0.19/dist/axios.min.js"></script>
99
<script src="https://cdn.jsdelivr.net/npm/oidc-client@1/dist/oidc-client.min.js"></script>
10-
<script src="https://cdn.jsdelivr.net/npm/@openeo/js-client@1/openeo.min.js"></script>
10+
<script src="https://cdn.jsdelivr.net/npm/@openeo/js-client@2/openeo.min.js"></script>
1111
<script type="text/javascript">
1212
const BACKEND = "https://example.openeo.org"; // TODO: Set the back-end to authenticate against
1313
const CLIENT_ID = ""; // TODO: Set the client id
14-
const REDIRECT_URI = "http://localhost/openid-connect-popup.html?signin"; // TODO: Set the redirect URI, should include ?signin - doesn't work with file://
15-
14+
OidcProvider.redirectUrl = "http://localhost/openid-connect-popup.html?signin"; // TODO: Set the redirect URI, should include ?signin - doesn't work with file://
1615
// Set the UI method, here we open a popup
17-
OidcProvider.setUiMethod("popup");
16+
OidcProvider.uiMethod = "popup";
1817

1918
var con;
2019
async function run() {
@@ -59,9 +58,12 @@
5958
var providers = await con.listAuthProviders();
6059
var provider = providers.find(p => p.getId() === id);
6160

61+
// Set the client ID
62+
provider.setClientId(CLIENT_ID);
63+
6264
// Start the login procedure (opens a popup as configured above)
6365
// Then waits for the popup to be closed
64-
await provider.login(CLIENT_ID, REDIRECT_URI);
66+
await provider.login();
6567

6668
// After the popup is closed, check whether the user is now authenticated
6769
if (con.isAuthenticated()) {

examples/oidc/openid-connect-redirect.html

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<meta name="viewport" content="width=device-width, initial-scale=1.0">
88
<script src="https://cdn.jsdelivr.net/npm/axios@0.19/dist/axios.min.js"></script>
99
<script src="https://cdn.jsdelivr.net/npm/oidc-client@1/dist/oidc-client.min.js"></script>
10-
<script src="https://cdn.jsdelivr.net/npm/@openeo/js-client@1/openeo.min.js"></script>
10+
<script src="https://cdn.jsdelivr.net/npm/@openeo/js-client@2/openeo.min.js"></script>
1111
<script type="text/javascript">
1212
const BACKEND = "https://example.openeo.org"; // TODO: Set the back-end to authenticate against
1313
const CLIENT_ID = ""; // TODO: Set the client id
@@ -78,8 +78,12 @@
7878
var providers = await con.listAuthProviders();
7979
var provider = providers.find(p => p.getId() === id);
8080

81-
// Start the login procedure (redirects to the identity provider by default)
82-
await provider.login(CLIENT_ID, REDIRECT_URI + id);
81+
// Set the client ID and redirect URI
82+
provider.setClientId(CLIENT_ID);
83+
OidcProvider.redirectUri = REDIRECT_URI + id;
84+
85+
// Start the login procedure (redirects to the identity provider)
86+
await provider.login();
8387
} catch (e) {
8488
log("Error: " + e.message);
8589
}

examples/web/discovery.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta charset="UTF-8">
77
<meta name="viewport" content="width=device-width, initial-scale=1.0">
88
<script src="https://cdn.jsdelivr.net/npm/axios@0.19/dist/axios.min.js"></script>
9-
<script src="https://cdn.jsdelivr.net/npm/@openeo/js-client@1/openeo.min.js"></script>
9+
<script src="https://cdn.jsdelivr.net/npm/@openeo/js-client@2/openeo.min.js"></script>
1010
<script type="text/javascript">
1111
var url = "https://earthengine.openeo.org"; // Insert the openEO server URL here
1212
var connection = null;

examples/web/workflow.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta charset="UTF-8">
77
<meta name="viewport" content="width=device-width, initial-scale=1.0">
88
<script src="https://cdn.jsdelivr.net/npm/axios@0.19/dist/axios.min.js"></script>
9-
<script src="https://cdn.jsdelivr.net/npm/@openeo/js-client@1/openeo.min.js"></script>
9+
<script src="https://cdn.jsdelivr.net/npm/@openeo/js-client@2/openeo.min.js"></script>
1010
<script type="text/javascript">
1111
async function run() {
1212
// Show the client version

0 commit comments

Comments
 (0)