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

feat: update impact js client to utilize api gateway authentication #32

Conversation

maraberg
Copy link
Collaborator

@maraberg maraberg commented Mar 20, 2024

What?
BREAKING CHANGE: This change drops support for token based authentication. The exchange happens in the api gateway on the modelon impact server. From now on you will need to use either authentication cookie in the browser OR impact-api-key to utilize the client via:
Client.fromImpactApiKey
or
Client.fromImpactSession

Why?
Following changes in coming authentication updates in Modelon Impact "API Gateway". JH-tokens are no longer needed to authenticate. Also, the exchange for the access token happens in the api gateway, meaning that we only need api-key or impact-session cookie to be present to authenticate.

How?
Removing:

Client.fromImpactToken()
Token exchange via /login

Also:
Updating how user-path is extracted
Adding check that impact-session cookie exists when using that as auth-method.

Testing?

Test suite has been updated to reflect changes
Dropped jhToken failure test

What is not in this MR
Missing:

A good way to test the cookie based authentication path
Convenience functions to re-establish impact session in the case of a logout.

Anything Else?
We should maybe wait to merge these changes until api-gateway work is done from cap-side.

@maraberg maraberg changed the title Topic/update impact js client to utilize api gateway authentication feat: update impact js client to utilize api gateway authentication Mar 20, 2024
@maraberg maraberg merged commit 011a923 into alpha Mar 20, 2024
1 of 3 checks passed
@maraberg maraberg deleted the topic/update-impact-js-client-to-utilize-api-gateway-authentication branch March 20, 2024 09:29
github-actions bot pushed a commit that referenced this pull request Mar 20, 2024
# [4.0.0-alpha.1](v3.2.8...v4.0.0-alpha.1) (2024-03-20)

* feat!: update impact js client to utilize api gateway authentication (#32) ([011a923](011a923)), closes [#32](#32)

### BREAKING CHANGES

* From now on the client only supports authentication using api-key and impact-session (cookie in browser) to authenticate
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.

1 participant