65 Commits

Author SHA1 Message Date
Joachim Van Herwegen
2ec8fabd54 feat: Add support for client_credentials authentication 2022-04-15 11:20:26 +02:00
Joachim Van Herwegen
e604c0c2e4 feat: Return client information from consent handler 2022-02-21 10:04:57 +01:00
Joachim Van Herwegen
e9e3c6df3c fix: Improve OIDC error descriptions 2022-02-21 10:04:57 +01:00
Joachim Van Herwegen
c9ed90aeeb fix: Update OIDC provider dependency to v7
The biggest resulting change is that the consent page always appears
after logging in.
Some minor fixes to be closer to the spec are included
together with some minor structural refactors.
2022-02-21 10:04:57 +01:00
Joachim Van Herwegen
1769b799df fix: Make IDP routes independent of handlers 2022-02-16 12:47:45 +01:00
Thomas Dupont
ce754c119f
fix: Add content-negotiation when fetching dataset from url
* Solution works but tests don't

* refactor(FetchUtil): use arrayifyStream

* refactor(FetchUtil): split fetchDataset into 2 separate functions

* style(FetchUtil): onelining instead of declaring new local var

* test: trying to mock rdfDereferencer

* refactor: promise can't have async function as arg

* test(FetchUtil): pass Quad array to mockDereference instead

* test: all tests should pass now and coverage is back to 100%

* style: comment typo

* chore: make package.json and package-lock.json compatible with main

* chore: fix package.json double entries

* chore: updated package.json to be alfabetical again

* refactor(AgentGroupAccessChecker): Remove converter from contructor and config

* refactor(TokenOwnerShipValidator): Remove converter from constructor and config

* refactor(FetchUtil): Return BadRequestHttpError instead of generic Error

* test(FetchUtil): return Response object instead of mocking fetch

* style: typos and newlines
2022-02-15 13:44:03 +01:00
Joachim Van Herwegen
a684b2ead7 feat: Update IDP templates to work with new API format 2022-02-11 10:52:45 +01:00
Joachim Van Herwegen
bc0eeb1012 feat: Split up IDP HTML, routing, and handler behaviour 2022-02-11 10:52:45 +01:00
Joachim Van Herwegen
8f8e8e6df4 feat: Send reset password recordId as query parameter
This is a revert of a previous change
but is now possible due to the use of JSON bodies.
This does mean JavaScript is required in the HTML page,
but that will be required for future changes anyway.
2022-02-11 10:52:45 +01:00
Thomas Dupont
d067165b68
fix: Split AccountStorage and ForgotPasswordStorage (expiring now) 2022-02-09 13:26:42 +01:00
Joachim Van Herwegen
90a6460c8d Merge branch 'main' into versions/3.0.0
# Conflicts:
#	package-lock.json
#	test/integration/Identity.test.ts
#	test/integration/RepresentationConverter.test.ts
2022-01-25 11:44:24 +01:00
Joachim Van Herwegen
af049124bf chore: Update eslint dependencies 2022-01-24 09:37:50 +01:00
Joachim Van Herwegen
4241c5348d feat: Move redirect support from IDP handler to specific handlers 2021-12-09 14:10:42 +01:00
Joachim Van Herwegen
520e4fe42f feat: Move OIDC library behaviour to separate path 2021-12-09 13:15:05 +01:00
Joachim Van Herwegen
5613ff9e71 fix: Let Representations always have a body
This is relevant when the request has a content-type
but no data.
2021-10-12 13:30:06 +02:00
Joachim Van Herwegen
b3da9c9fcf refactor: Restructure source code folder
This way the location of certain classes should make more sense
2021-10-12 12:51:02 +02:00
Joachim Van Herwegen
bb7e88b137 refactor: Split HttpHandler behaviour over multiple classes
This allows easier reuse of certain reoccurring behaviours,
such as authorization.
The AuthenticatedLdpHandler is no longer required
since it is a combination of parsing and authorization.
This did require a small change to the OperationHandler interface.
2021-10-07 15:51:11 +02:00
Joachim Van Herwegen
8f5d61911d feat: Always grant control permissions to pod owners 2021-10-05 13:19:01 +02:00
Joachim Van Herwegen
6c4ccb334d feat: Store account settings separately
Account settings are stored using the WebID as key.
Reason for using the WebID is that this allows faster access to the settings
in authenticated requests.
A consequence of this is that passwords are now always required during registration,
and that there can only be 1 account per WebID.
2021-10-05 13:19:01 +02:00
Joachim Van Herwegen
4e1a2f5981 feat: Create SetupHttpHandler
This handler allows users to set up servers with a pod
and without having to enable public access first
2021-09-27 10:32:34 +02:00
Joachim Van Herwegen
e31cd38bc5 feat: Provide details field when throwing Token ownership error 2021-09-08 13:55:52 +02:00
Joachim Van Herwegen
cc1c3d9223 feat: Support JSON errors
The IDP behaviour has been changed to move all error related knowledge
to the IdentityProviderHttpHandler instead of managing it
in the Interactionhandlers.
2021-09-08 13:55:52 +02:00
Joachim Van Herwegen
bbfbfbbce4 refactor: Move InteractionRoute behaviour to separate class 2021-09-08 13:55:52 +02:00
Joachim Van Herwegen
3542fe29da feat: Remove useless fields from IDP JSON response 2021-09-08 13:55:52 +02:00
Joachim Van Herwegen
32a182dde8 feat: Add controls to IDP response JSON
Controls are now used in templates to prevent IDP URL hardcoding
2021-09-08 13:55:52 +02:00
Joachim Van Herwegen
d68854a474 feat: Simplify IDP routing 2021-09-08 13:55:52 +02:00
Joachim Van Herwegen
20197ea1de feat: Generalize HTTP handler behaviour in BaseHttpHandler 2021-09-08 13:55:52 +02:00
Joachim Van Herwegen
4f1a86dfa0 feat: Convert IDP input data to JSON 2021-09-08 13:55:52 +02:00
Joachim Van Herwegen
1e1edd5c67 refactor: Clean up internal storage
Each IDP class using storage now has a different storage.
This way those classes don't have to worry about clashing keys anymore.

All internal storage is now in the /.internal/ container,
thereby making it easier to take the location of the internal data into account:
only 1 path needs to be blocked and a regex router handling internal data
differently only has to match 1 path as well.
2021-09-08 10:01:51 +02:00
Joachim Van Herwegen
ff200e22a9 feat: Add a cache to the AgentGroupAccessChecker 2021-08-23 16:39:25 +02:00
Joachim Van Herwegen
a062a710bc fix: Explain why logging in will not work 2021-08-18 16:51:12 +02:00
Joachim Van Herwegen
f0f59a8f27 refactor: Move URL join utility function to PathUtil 2021-08-18 15:39:02 +02:00
Joachim Van Herwegen
80ebd02cc4 feat: Support content negotiation for IDP requests 2021-08-18 15:39:02 +02:00
Joachim Van Herwegen
7b42c72142 feat: Let InteractionCompleter return redirect URL 2021-08-18 15:39:02 +02:00
Joachim Van Herwegen
7b7040a196 feat: Use RequestParser and ResponseWriter for IDP 2021-08-18 15:39:02 +02:00
Joachim Van Herwegen
47b3a2d77f fix: Allow clients to be remembered in the SessionHttpHandler 2021-08-17 16:58:56 +02:00
Joachim Van Herwegen
f71f8683fc feat: Indicate to templates if this is part of an auth request 2021-08-16 09:39:02 +02:00
Joachim Van Herwegen
cb227d6431 feat: Throw error when trying to complete interaction out of session 2021-08-16 09:39:02 +02:00
Ruben Verborgh
c1d8f0e841 docs: Clarify ownership validation message. 2021-08-04 16:56:35 +02:00
Joachim Van Herwegen
d3de5f3114 feat: Pass optional Interaction to InteractionHandlers 2021-08-04 16:21:13 +02:00
Joachim Van Herwegen
18a71032c0 feat: Create ChainedTemplateEngine for combining engines 2021-08-03 12:52:30 +02:00
Joachim Van Herwegen
63e88578c3 feat: Rewrite TokenOwnershipValidator behaviour to remove @rdfjs/fetch dependency 2021-08-02 12:02:10 +02:00
Joachim Van Herwegen
9d337ba80c feat: Moved IDP response and template behaviour to single class 2021-08-02 11:29:33 +02:00
Ruben Verborgh
969bb0ee6c docs: Make registration form self-explanatory. 2021-07-30 13:20:19 +02:00
Joachim Van Herwegen
d596d575a1 fix: Clean pod creation input parameters during registration 2021-07-27 08:49:53 +02:00
Joachim Van Herwegen
2df3f1f28c fix: Trust X-Forwarded headers in the IDP 2021-07-26 14:13:03 +02:00
Ruben Verborgh
defdb32a35 docs: Add pod README. 2021-07-23 23:13:38 +02:00
Joachim Van Herwegen
3bb7a32c0c feat: Add support for client_id WebIDs 2021-07-23 16:44:50 +02:00
Joachim Van Herwegen
60ebf5454a feat: Let InitialInteractionHandler redirect requests 2021-07-23 16:08:28 +02:00
Joachim Van Herwegen
0e67004ef4 feat: Store reset password ID in the submit URL 2021-07-23 16:08:28 +02:00