Commit graph

384 commits

Author SHA1 Message Date
Yarmo Mackenbach
67b7ae685c
Change order of opts 2021-04-16 13:03:01 +02:00
Yarmo Mackenbach
a3c11d6c80
Add defaults module 2021-04-16 12:59:44 +02:00
Yarmo Mackenbach
f3e0744c60
Fix persistence issue 2021-04-16 11:43:29 +02:00
Yarmo Mackenbach
f5964ed305
Adapt proxy URL generator to v2 API 2021-04-16 11:36:59 +02:00
Yarmo Mackenbach
5951315ebf
Fix exports 2021-04-16 10:57:11 +02:00
Yarmo Mackenbach
2afb30d3e4
Deprecate claims.js, introduce proofs.js 2021-04-16 10:56:33 +02:00
Yarmo Mackenbach
e99a0307bf
Change ProofFormat to strings 2021-04-16 10:54:28 +02:00
Yarmo Mackenbach
7cf509b6f5
Fixed usage of opts 2021-04-16 10:51:48 +02:00
Yarmo Mackenbach
b78766341f
Fixed proof format 2021-04-16 10:48:57 +02:00
Yarmo Mackenbach
954899162e
Add gitlab proxy route 2021-04-15 23:22:17 +02:00
Yarmo Mackenbach
2299d339a3
Fix variable name 2021-04-15 23:21:12 +02:00
Yarmo Mackenbach
59a779e6ff
Adapt to new claimDefinition format 2021-04-15 22:52:52 +02:00
Yarmo Mackenbach
2bf92ff9df
Improve handling of request timeout 2021-04-15 22:30:11 +02:00
Yarmo Mackenbach
be258abf93
Fix several mistakes 2021-04-15 21:50:49 +02:00
Yarmo Mackenbach
91a3ed1e96
Improve fetcher input validation 2021-04-15 19:07:56 +02:00
Yarmo Mackenbach
8e1ac82fde
Fix path to claim 2021-04-15 18:53:08 +02:00
Yarmo Mackenbach
2e6baef01d
Improve query validation 2021-04-15 15:09:57 +02:00
Yarmo Mackenbach
c333229e5d
Handle invalid endpoints 2021-04-15 14:49:25 +02:00
Yarmo Mackenbach
c13c65aa5e
Make v2 proxy API compatible with new fetchers 2021-04-15 14:47:45 +02:00
Yarmo Mackenbach
ddebc2d58b
Fix missing async 2021-04-15 12:55:27 +02:00
Yarmo Mackenbach
6f6506bf23
Add extra format field 2021-04-15 12:29:18 +02:00
Yarmo Mackenbach
0708a900ac
Add enums 2021-04-15 10:21:56 +02:00
Yarmo Mackenbach
a47c88ca36
Replace strings with enums 2021-04-15 10:21:18 +02:00
Yarmo Mackenbach
09677602cc
Remove obsolete file 2021-04-15 10:19:52 +02:00
Yarmo Mackenbach
be0f660e85
Change serviceproviders to claimDefinitions 2021-04-15 10:19:24 +02:00
Yarmo Mackenbach
1bbf6511e4
Add ProxyPolicy enum 2021-04-12 17:01:25 +02:00
Yarmo Mackenbach
bb5f3ccea2
Update fetchers, add gitlab fetcher 2021-04-12 16:14:18 +02:00
Yarmo Mackenbach
228f924ece
Fix data sent to fetcher 2021-04-12 16:13:08 +02:00
Yarmo Mackenbach
3702764aa6
Update enums 2021-04-12 15:59:21 +02:00
Yarmo Mackenbach
f4308fb79d
Update definitions 2021-04-12 15:59:03 +02:00
Yarmo Mackenbach
a9e69de547
Register v2 proxy API 2021-04-12 14:37:31 +02:00
Yarmo Mackenbach
9ff781a234
Restore v1 of proxy API, add new v2 API 2021-04-12 14:36:44 +02:00
Yarmo Mackenbach
c5ad812101
Add more enums 2021-04-12 14:31:48 +02:00
Yarmo Mackenbach
10a32f98a5
Update serviceProviders with enums 2021-04-12 14:31:34 +02:00
Yarmo Mackenbach
8dc0372ea7
Remove request handling 2021-04-12 12:16:08 +02:00
Yarmo Mackenbach
81b56341cc
Add enums module 2021-04-12 12:15:02 +02:00
Yarmo Mackenbach
e2a6aff9d8
Add HTTP fetcher 2021-04-12 12:14:41 +02:00
Yarmo Mackenbach
becc579790
Remove obsolete require 2021-04-12 12:08:50 +02:00
Yarmo Mackenbach
8e990458a6
Improve API response 2021-04-09 14:43:08 +02:00
Yarmo Mackenbach
d2b9854a2f
Remove obsolete code 2021-04-09 14:42:03 +02:00
Yarmo Mackenbach
be547b0e5d
Increase IRC timeout delay 2021-04-09 14:25:05 +02:00
Yarmo Mackenbach
28582999eb
Switch to fetcher 2021-03-25 16:43:21 +01:00
Yarmo Mackenbach
0bc97bd902
Improve promise handling 2021-03-25 16:28:56 +01:00
Yarmo Mackenbach
ff93ceee0d
Fix IRC fetch logic 2021-03-25 16:27:57 +01:00
Yarmo Mackenbach
e6e25a65e7
Add timeout to fetcher functions 2021-03-25 15:37:30 +01:00
Yarmo Mackenbach
5ea67c1e6f
Improve consistency 2021-03-25 14:33:58 +01:00
Yarmo Mackenbach
358b4bbf8f
Add fetcher functions 2021-03-25 14:31:29 +01:00
Yarmo Mackenbach
1db8683886
Fix bug causing false positive verification 2021-03-25 13:21:49 +01:00
Yarmo Mackenbach
b5f6685da6
Integrate proxy server 2021-03-25 11:32:03 +01:00
Yarmo Mackenbach
622d56b47d
Make matrix URIs compliant with MSC2312 2021-03-22 17:38:56 +01:00
Yarmo Mackenbach
fc66f545ef
Add matrix.to links 2021-03-06 23:32:10 +01:00
Yarmo Mackenbach
7641d1639a
Run prettier 2021-03-06 00:04:56 +01:00
Yarmo Mackenbach
f05585bf60
Fix url encoding 2021-03-06 00:02:58 +01:00
Yarmo Mackenbach
f0b84a831a
Add matrix service provider 2021-03-05 17:07:30 +01:00
Yarmo Mackenbach
6b40902a8f
Handle requests without URI 2021-03-05 17:06:27 +01:00
Yarmo Mackenbach
bd7bee7aff
Increase verification timeout 2021-03-05 15:41:53 +01:00
Yarmo Mackenbach
a4fac3b83b
Add IRC service provider 2021-03-05 15:39:17 +01:00
Yarmo Mackenbach
441655ac1e
Generate proxy URLs with complex path 2021-03-05 15:11:13 +01:00
Yarmo Mackenbach
44b76d6ed8
Fix logic error 2021-03-02 15:22:56 +01:00
Yarmo Mackenbach
cee8fa9172
Add Twitter proxy verification 2021-03-02 15:10:46 +01:00
Yarmo Mackenbach
9ae63415cb
Remove dependency 2021-03-02 10:46:52 +01:00
Yarmo Mackenbach
95ac04b838
Run prettier 2021-03-01 18:27:29 +01:00
Yarmo Mackenbach
0e181f524d
Make Twitter verification configurable 2021-03-01 17:56:31 +01:00
Yarmo Mackenbach
333acd5c0d
Add promise.allSettled polyfill 2021-01-26 21:44:17 +01:00
Yarmo Mackenbach
ce92b4c9bd
Update year 2021-01-13 13:20:33 +01:00
Yarmo Mackenbach
e0c268b9ad Merge pull request 'Add owncast service provider' (#10) from add_owncast into main
Reviewed-on: https://codeberg.org/keyoxide/doipjs/pulls/10
2021-01-13 13:19:02 +01:00
Yarmo Mackenbach
1878773c59
Fix typo in keyserver url 2021-01-10 17:56:59 +01:00
Yarmo Mackenbach
df896db473 Fix regex skipping some claims 2021-01-10 12:26:18 +01:00
Yarmo Mackenbach
4f3db39b18 Make network errors not block code execution 2021-01-09 16:04:07 +01:00
Yarmo Mackenbach
6e828ca588 Add parameter to catch blocks 2021-01-09 15:21:30 +01:00
Yarmo Mackenbach
996ee8fbc7 Use signature data to find key location 2021-01-09 15:17:53 +01:00
Yarmo Mackenbach
6c2aa92187 Run prettier 2021-01-07 16:17:24 +01:00
Yarmo Mackenbach
9db48d627d Add signature verification 2021-01-07 16:15:50 +01:00
Yarmo Mackenbach
b65711d38b Remove trailing slash from HKP server URL 2021-01-03 19:49:13 +01:00
Yarmo Mackenbach
fcc3dfde2f Fetch twitter proofs from nitter 2021-01-02 16:34:01 +01:00
Yarmo Mackenbach
8a5ce08c00 Fix handling of users without userId 2020-12-26 14:08:21 +01:00
Yarmo Mackenbach
32c01756d3 Fix handling users without selfCertifications 2020-12-26 13:56:36 +01:00
Yarmo Mackenbach
41696afd0d Add owncast service provider 2020-12-26 13:52:49 +01:00
Yarmo Mackenbach
347c48ff4e Run prettier 2020-12-20 23:19:07 +01:00
Yarmo Mackenbach
de5d358b31 Add return after resolve and reject 2020-12-20 23:02:59 +01:00
Yarmo Mackenbach
a1ff96a1b9 Return obj with error message instead of undefined 2020-12-20 22:55:08 +01:00
Yarmo Mackenbach
686f0e2a5e Add timeout to promise, return undefined on error 2020-12-20 22:44:37 +01:00
Yarmo Mackenbach
6f6f20d131 Implement fallback proxy policy 2020-12-10 23:23:43 +01:00
Yarmo Mackenbach
2ba601d0eb Update service providers prone to network errors 2020-12-10 23:23:26 +01:00
Yarmo Mackenbach
0efa5350a5 Gracefully handle failed network requests 2020-12-10 23:22:46 +01:00
Yarmo Mackenbach
d8a14abac3 Improve proxy policy handling, new fallback policy 2020-12-10 23:22:10 +01:00
Yarmo Mackenbach
eca111aaa7 Allow promises to reject without blocking execution 2020-12-10 23:21:22 +01:00
Yarmo Mackenbach
35b52aa6d4 Fix missing opts 2020-12-10 02:59:04 +01:00
Yarmo Mackenbach
f6638432f2 Fix browser bundling 2020-12-10 01:56:34 +01:00
Yarmo Mackenbach
e599b32dba Fix handling HKP URI 2020-12-08 02:56:54 +01:00
Yarmo Mackenbach
41b1d0767b Fix support for specifying keyservers 2020-12-08 02:29:10 +01:00
Yarmo Mackenbach
34dc50d031 Run prettier 2020-12-05 23:14:09 +01:00
Yarmo Mackenbach
b9c76b7c0e Properly reject promises 2020-12-05 23:13:44 +01:00
Yarmo Mackenbach
f49e9029e9 Improve error message 2020-12-05 23:10:48 +01:00
Yarmo Mackenbach
580510d0d0 Make claims.verify handle notations from all users 2020-11-20 23:20:26 +01:00
Yarmo Mackenbach
33f4b5c882 Make keys.process get notations from all users 2020-11-20 22:53:56 +01:00
Yarmo Mackenbach
b2503bfcab Improve regex 2020-11-20 19:40:20 +01:00
Yarmo Mackenbach
544f339dcf Fix linking to bundled openpgp 2020-11-20 09:13:08 +01:00
Yarmo Mackenbach
eb4c03004e Return undefined instead of null in case of an error 2020-11-18 20:32:36 +01:00
Yarmo Mackenbach
51bf130397 Require bundled version of openpgp 2020-11-17 02:43:59 +01:00
Yarmo Mackenbach
62df82b5c8 Allow verification of keys and claim arrays 2020-11-17 02:18:08 +01:00
Yarmo Mackenbach
f056c666cb Fix bad value return 2020-11-17 02:17:40 +01:00
Yarmo Mackenbach
de1b35a894 Add keys module 2020-11-17 02:13:56 +01:00
Yarmo Mackenbach
8b1b741124 Add User-Agent to HTTP requests 2020-11-17 02:13:06 +01:00
Yarmo Mackenbach
4f19bd9a38 Clean up directRequestHandler 2020-11-17 02:03:34 +01:00
Yarmo Mackenbach
0f58accbe2 Run prettier 2020-11-17 01:20:00 +01:00
Yarmo Mackenbach
094aca1283 Restructure code
Merge claimVerification and proofs into claims
2020-11-17 01:18:12 +01:00
Yarmo Mackenbach
c7ac3a9d34 Put proofs logic in separate file 2020-11-17 00:50:26 +01:00
Yarmo Mackenbach
2ac99ba709 Fix missing license headers 2020-11-12 18:54:40 +01:00
Yarmo Mackenbach
8e73360d46 Support xmpp via doip-proxy 2020-11-08 12:22:36 +01:00
Yarmo Mackenbach
4c6715ddb4 Run prettier on code 2020-11-08 02:07:02 +01:00
Yarmo Mackenbach
aaf9079de5 Update service provider data structure 2020-11-06 02:27:56 +01:00
Yarmo Mackenbach
d2f03d9bde Removed unused variable 2020-11-06 01:41:00 +01:00
Yarmo Mackenbach
8c14d2533c Improve handling of opts 2020-11-06 01:16:15 +01:00
Yarmo Mackenbach
86aa366ccc Remove dotenv and better handle options 2020-11-06 00:43:32 +01:00
Yarmo Mackenbach
bea7679255 Add custom request handler for DNS 2020-11-05 12:57:37 +01:00
Yarmo Mackenbach
98d7e680ef Fix body request 2020-11-05 12:57:22 +01:00
Yarmo Mackenbach
05d6986349 Handle erroneous input better 2020-11-05 12:57:13 +01:00
Yarmo Mackenbach
7be3c27397 Variable name change 2020-11-05 11:33:03 +01:00
Yarmo Mackenbach
82852217fb Add liberapay service provider 2020-11-04 22:38:03 +01:00
Yarmo Mackenbach
a9fc0e4b44 Fix dots in regex 2020-11-04 22:25:45 +01:00
Yarmo Mackenbach
eba9d48af2 Apply generateProxyURL to DNS service provider 2020-11-04 03:04:22 +01:00
Yarmo Mackenbach
2ac42a6edf Add proxyRequestHandler 2020-11-04 03:02:15 +01:00
Yarmo Mackenbach
596db98bfd Add utils.generateProxyURL 2020-11-04 03:01:02 +01:00
Yarmo Mackenbach
8a144ca24a Update DNS proxy 2020-11-04 02:41:24 +01:00
Yarmo Mackenbach
18c8662db8 Improve handling of arrays in json 2020-11-04 02:41:14 +01:00
Yarmo Mackenbach
fc66e8fce4 Minor fix 2020-11-04 02:16:59 +01:00
Yarmo Mackenbach
c786b2cc10 Fix handling of unverified proofs 2020-11-03 22:50:35 +01:00
Yarmo Mackenbach
336cbc9f83 Add discourse service provider 2020-11-03 22:23:35 +01:00
Yarmo Mackenbach
96e948b3af Add fediverse service provider 2020-11-03 00:41:03 +01:00
Yarmo Mackenbach
ed9c1a4bec Add mastodon service provider 2020-11-03 00:25:25 +01:00
Yarmo Mackenbach
2aaa1ce1e2 Make claimVerification return errors 2020-11-03 00:25:02 +01:00
Yarmo Mackenbach
9c1fdc5c4b Fix request headers 2020-11-03 00:23:50 +01:00
Yarmo Mackenbach
b04e5046ed Fix request headers 2020-11-03 00:14:19 +01:00
Yarmo Mackenbach
5dfe2412c4 Add header to request 2020-11-02 18:21:56 +01:00
Yarmo Mackenbach
7c84bd2010 Update gitlab data 2020-10-26 22:58:34 +01:00
Yarmo Mackenbach
12e638f8de Fix gitlab tests 2020-10-26 22:55:27 +01:00
Yarmo Mackenbach
f6738e978d Fix regex 2020-10-26 22:50:41 +01:00
Yarmo Mackenbach
c49cc20953 WIP Add gitlab 2020-10-26 22:33:05 +01:00
Yarmo Mackenbach
8bc187feed Fix async await 2020-10-26 21:21:11 +01:00
Yarmo Mackenbach
8d44b4f9bc Use request handlers 2020-10-26 21:18:17 +01:00
Yarmo Mackenbach
8ed689386b Add github service provider 2020-10-26 00:04:19 +01:00
Yarmo Mackenbach
391c960fa5 Add gitea service provider 2020-10-25 23:32:30 +01:00
Yarmo Mackenbach
154aba5346 Add reddit service provider 2020-10-25 23:20:22 +01:00
Yarmo Mackenbach
d2bae37e47 Add devto service provider 2020-10-25 23:06:00 +01:00
Yarmo Mackenbach
8e4ed49aec Update dns data 2020-10-25 02:01:35 +02:00
Yarmo Mackenbach
e04599962f Revert change to not interfere with bundling 2020-10-25 01:54:27 +02:00
Yarmo Mackenbach
39a74a6177 Automatically generate service provider data 2020-10-25 01:20:20 +02:00
Yarmo Mackenbach
f2fdbd3a8b Add lobsters service provider 2020-10-25 01:16:13 +02:00
Yarmo Mackenbach
5c6b0e0507 Minor change 2020-10-25 01:12:57 +02:00
Yarmo Mackenbach
cbd86d81aa Handle no matching service provider 2020-10-25 01:06:45 +02:00
Yarmo Mackenbach
bdd918df4c Minor changes 2020-10-25 01:02:21 +02:00
Yarmo Mackenbach
2b22799fff Allow opts to pass through to matching function 2020-10-25 01:02:08 +02:00
Yarmo Mackenbach
1388227fe4 Add exports 2020-10-25 00:41:06 +02:00
Yarmo Mackenbach
8bcf779d33 Modify generateClaim behavior 2020-10-25 00:39:43 +02:00
Yarmo Mackenbach
4794320d92 Update service provider data 2020-10-25 00:32:50 +02:00
Yarmo Mackenbach
118bfc1c0f Add handling of proof data 2020-10-25 00:32:12 +02:00
Yarmo Mackenbach
6e966f4df5 Add claimVerification scripts 2020-10-25 00:31:42 +02:00
Yarmo Mackenbach
1f29accb5f Add utils 2020-10-25 00:31:14 +02:00
Yarmo Mackenbach
061c834f84 Change data structure 2020-10-24 23:35:54 +02:00
Yarmo Mackenbach
33a2a7804a Change code structure 2020-10-24 20:33:34 +02:00
Yarmo Mackenbach
c262f96d4f Update code structure 2020-10-24 19:10:28 +02:00
Yarmo Mackenbach
1b1d11c802 WIP Handling of fetched data 2020-10-24 18:43:41 +02:00
Yarmo Mackenbach
55ee948111 Fix data 2020-10-24 18:29:14 +02:00
Yarmo Mackenbach
d81bf10070 Add proof.format field to service provider data structure 2020-10-24 17:30:22 +02:00
Yarmo Mackenbach
0a00ab5060 Rename function 2020-10-24 17:13:14 +02:00
Yarmo Mackenbach
81edf64046 Update the data structure used by service providers 2020-10-24 16:42:22 +02:00
Yarmo Mackenbach
fa5dee8505 Add Hackernews service provider 2020-10-24 15:50:14 +02:00
Yarmo Mackenbach
638eecee46 Add Twitter service provider 2020-10-24 15:33:51 +02:00
Yarmo Mackenbach
74d92511ec Fix handling of missing opts 2020-10-24 15:33:25 +02:00
Yarmo Mackenbach
11c0425e59 Change license to Apache-2.0 2020-10-24 15:11:14 +02:00
Yarmo Mackenbach
656ac3541d Fix handling of missing opts 2020-10-24 14:36:22 +02:00
Yarmo Mackenbach
1eb98349d2 Add license header 2020-10-24 12:05:11 +02:00
Yarmo Mackenbach
ea2b6712cd Remove obsolete code 2020-10-24 11:58:07 +02:00
Yarmo Mackenbach
ab5b4814c6 Add license header 2020-10-24 11:57:27 +02:00
Yarmo Mackenbach
1230e5b9d8 Throw error for invalid URI 2020-10-24 11:56:30 +02:00
Yarmo Mackenbach
7f24354c1d Allow verify to match the URI to a service provider 2020-10-24 11:45:30 +02:00
Yarmo Mackenbach
2521225a9b Handle missing XMPP_VCARD_SERVER_DOMAIN 2020-10-24 11:44:40 +02:00
Yarmo Mackenbach
012ef682e6 Replace URL with URI 2020-10-24 11:20:34 +02:00
Yarmo Mackenbach
b78d7a7ce9 Add URI validation 2020-10-24 11:19:35 +02:00
Yarmo Mackenbach
43b16ffbaf Replace URL with URI 2020-10-24 11:18:06 +02:00
Yarmo Mackenbach
65cf309ea7 Restructure exports 2020-10-24 01:25:01 +02:00
Yarmo Mackenbach
e8aa308baa Fix and improve service provider tests 2020-10-24 01:06:46 +02:00
Yarmo Mackenbach
e996bc8023 Initial commit 2020-10-23 22:35:53 +02:00