Compare commits

...

933 commits

Author SHA1 Message Date
Patrick Stewart
2ea69f2cde Refactor: changing namespace, imports, re-branding 2024-10-12 19:17:24 -07:00
Patrick Stewart
f4abaf2474 Refactor: changing namespace, imports, re-branding 2024-10-12 18:45:27 -07:00
Patrick Stewart
7983c9c6a9 Update: correcting errors 2024-10-12 03:49:17 -07:00
Patrick Stewart
bfefacda30 Refactor: changing namespace, imports, re-branding 2024-10-12 03:41:18 -07:00
Patrick Stewart
67d5f183c1 Refactor: changing namespace, imports, re-branding 2024-10-12 03:39:20 -07:00
Patrick Stewart
3865bd41df Refactor: changing namespace, imports, re-branding 2024-10-12 03:35:14 -07:00
Patrick Stewart
b71744869d Add: adding/updating common project files 2024-10-12 01:24:49 -07:00
Patrick Stewart
496d05c05d Refactor: new project structure in motion not complete 2024-10-11 23:42:40 -07:00
Patrick Stewart
9ffe9d6b09 Refactor: new project structure in motion not complete 2024-10-11 23:23:45 -07:00
Patrick Stewart
b92f821745 Refactor: moved core/ into packages/ will keep core packages together 2024-10-11 19:22:40 -07:00
Patrick Stewart
432cf59cf8 Remove: removing deprecated archived packages 2024-10-11 19:14:23 -07:00
Patrick Stewart
218e4735dd Refactor: renaming utils to utilities 2024-10-11 19:13:44 -07:00
Patrick Stewart
d18bcef2ca Refactor: renaming utils to utilities 2024-10-11 19:13:19 -07:00
Patrick Stewart
28e355510b Clean: cleaning up workspace from testing 2024-10-11 18:52:19 -07:00
Patrick Stewart
562bb5a433 Remove: deleting temp file 2024-10-11 11:25:51 -07:00
Patrick Stewart
b03a7d74c2 Update: unlocking wspace 2024-10-11 11:23:39 -07:00
Patrick Stewart
8d2f32b3e8 Remove: deleting files moved to wspace 2024-10-11 00:29:38 -07:00
Patrick Stewart
2153827523 Update: adding wspace to gitignore don't commit wspace on main branch 2024-10-11 00:23:56 -07:00
Patrick Stewart
1334de4cf4 Update: unlocking inbox 2024-10-10 23:56:20 -07:00
Patrick Stewart
46824efee0 Update: adding comments to dispatcher 2024-10-10 23:55:23 -07:00
Patrick Stewart
7dfa47cfe9 Test: adding checkpoint for ALL passing test 2024-10-06 20:48:33 -07:00
Patrick Stewart
f4f36206b6 Test: adding checkpoint for passing test 2024-10-06 19:35:39 -07:00
Patrick Stewart
37c2720969 Update: adding bus package not production grade zero test passing 2024-10-06 09:50:42 -07:00
Patrick Stewart
802de34a33 Add: adding support for console and contract packages 2024-10-06 04:14:20 -07:00
Patrick Stewart
00f68a57cc Add: adding reflectable and mock generated files to ignore 2024-10-06 03:02:50 -07:00
Patrick Stewart
b82a2db9a7 Remove: deleting generated mock file 2024-10-06 03:00:43 -07:00
Patrick Stewart
61928f5b12 Update: Test Passing queue package not ready for production use 2024-10-06 02:27:59 -07:00
Patrick Stewart
f636c29fdf Test: adding checkpoint for ALL passing test 2024-10-06 00:47:27 -07:00
Patrick Stewart
b2794f4f0b Test: adding checkpoint for ALL passing test 2024-10-06 00:37:24 -07:00
Patrick Stewart
6c8ca004ba Remove: deleting old test helper files 2024-10-05 23:46:28 -07:00
Patrick Stewart
c01e96ddc9 Test: adding checkpoint for passing test 2024-10-05 23:46:09 -07:00
Patrick Stewart
42596c1026 Test: adding checkpoint for passing test 2024-10-05 22:07:25 -07:00
Patrick Stewart
5e25d7729d Test: adding checkpoint for passing test 2024-10-05 21:06:00 -07:00
Patrick Stewart
96984ea7da Test: adding checkpoint for passing test 2024-10-05 19:43:53 -07:00
Patrick Stewart
3ab3a4261c Test: adding checkpoint for passing test 2024-10-05 19:35:50 -07:00
Patrick Stewart
3d04bbb561 Add: adding initial queue code 2024-10-05 15:32:35 -07:00
Patrick Stewart
a67b75ca52 Add: adding projects to support queue, broadcasting and bus packages 2024-10-05 13:53:44 -07:00
Patrick Stewart
931695b22e Add: adding wspace dir as workspace for new packages 2024-10-05 10:53:32 -07:00
Patrick Stewart
ae41dbf55d Refactor: moving package candidates to sandbox all potential forks here 2024-10-05 10:52:58 -07:00
Patrick Stewart
2e4e153b4f Update: completed writing initial unit test all are passing 2024-10-05 10:51:21 -07:00
Patrick Stewart
fadcffdc25 Add: adding new directories to build 2024-10-05 10:50:13 -07:00
Patrick Stewart
ee9d512c1f Update: added id field to message made mqclient reachable from outside 2024-10-04 19:58:26 -07:00
Patrick Stewart
dcddc2992a Add: adding events package not ready for production use passing test 2024-10-04 19:57:22 -07:00
Patrick Stewart
775bae4a61 Update: refactoring pipeline package passing test 2024-10-04 00:05:16 -07:00
Patrick Stewart
2d351c1319 Add: adding pipeline package not production ready 2024-10-03 07:58:46 -07:00
Patrick Stewart
4b112cd54b Add: adding process package not production ready 2024-10-03 07:58:07 -07:00
Patrick Stewart
b3f3a263fd Update: changing package name 2024-10-03 07:56:35 -07:00
Patrick Stewart
5687c693d2 Update: updating .gitignore for generated files 2024-10-02 19:47:20 -07:00
Patrick Stewart
7afe56844e Remove: deleting generated files 2024-10-02 19:45:00 -07:00
Patrick Stewart
80a8b135c7 Add: adding support for laravel inspired serviceprovider 2024-10-02 19:18:06 -07:00
Patrick Stewart
0915c48054 Add: support for registerTransient, registerScoped and registerConstant 2024-10-02 19:17:17 -07:00
Patrick Stewart
11c12fd590 Add: adding forked event_bus_plus as project event bus 2024-10-02 18:53:12 -07:00
Patrick Stewart
c194fadbc2 Fix: fixing commit issue 2024-10-02 18:51:40 -07:00
Patrick Stewart
62fc87e619 Update: updating structure adding forked rxdart, event_bus_plus, dart_mq 2024-10-02 18:48:52 -07:00
Patrick Stewart
1bd7ecd19b Remove: delete keep file 2024-10-02 16:45:39 -07:00
Patrick Stewart
9aab0837cb Update: isolating platform core components 2024-10-02 16:43:31 -07:00
Patrick Stewart
5833e9df6b Update: updating project readme 2024-10-02 00:01:04 -07:00
Patrick Stewart
2ac0157b4a Update: updating project readme 2024-10-01 23:03:21 -07:00
Patrick Stewart
8d016a5b56 Remove: deleting core folder 2024-10-01 21:23:48 -07:00
Patrick Stewart
14a3f4027d Add: adding new folders to project structure 2024-10-01 20:53:00 -07:00
Patrick Stewart
9157754f72 Refactor: renaming doc to docs 2024-10-01 20:40:15 -07:00
Patrick Stewart
75688821a7 Remove: deleting github actions 2024-10-01 20:34:22 -07:00
Patrick Stewart
eab5bca3ec Update: restoring license back to original MIT
Some checks failed
Angel3 CI / Validate framework package (push) Has been cancelled
Angel3 CI / Validate ORM packages (push) Has been cancelled
2024-10-01 20:21:23 -07:00
Patrick Stewart
6194185e87 Rebrand: rebranding angel3 to protevus
Some checks are pending
Angel3 CI / Validate framework package (push) Waiting to run
Angel3 CI / Validate ORM packages (push) Waiting to run
2024-10-01 20:13:38 -07:00
Patrick Stewart
e4775d1ea9 Remove: deleting melos jetbrains artifacts
Some checks are pending
Angel3 CI / Validate framework package (push) Waiting to run
Angel3 CI / Validate ORM packages (push) Waiting to run
2024-10-01 20:11:25 -07:00
Patrick Stewart
78671dd621 Hard-Fork: Hard fork of the angel3 project as base for protevus
Some checks are pending
Angel3 CI / Validate framework package (push) Waiting to run
Angel3 CI / Validate ORM packages (push) Waiting to run
2024-10-01 19:51:04 -07:00
Thomas
8d6f66abcb
Merge pull request #149 from dukefirehawk/release/angel3_migration
Publish angel3_migration
2024-08-07 17:41:59 +08:00
Thomas Hii
84f205845a Publish angel3_migration 2024-08-07 17:30:19 +08:00
Thomas
9bb742dcad
Merge pull request #148 from Garthi/feature/migration_standalone_index
add a way to change indexes with migrations without alter table
2024-08-04 09:00:49 +08:00
Garth
c8167753b2 comment removed 2024-08-04 02:03:03 +02:00
Garth
9e34773962 add a way to change indexes with migrations without alter table 2024-08-04 01:51:03 +02:00
Thomas
6bf4ad4b9e
Merge pull request #146 from Garthi/feature/migration_index_upgrade
index handling for after table
2024-07-29 09:01:39 +08:00
Garth
ea94d33b87 add methods to add and drop indexes with alter table 2024-07-28 10:13:31 +02:00
Thomas
7cbdcb0255
Merge pull request #145 from dukefirehawk/bugfix/mariadb
Fixed mariadb issue
2024-07-21 11:57:40 +08:00
Thomas Hii
d3df89c0a3 Fixed mariadb issue 2024-07-21 11:16:49 +08:00
Thomas
19a7f8316d
Merge pull request #144 from dukefirehawk/bugfix/mysql
Bugfix/mysql
2024-07-20 15:58:45 +08:00
Thomas Hii
5ed443ae33 Fixed MySQL migration 2024-07-20 15:37:25 +08:00
Thomas Hii
7e42a7e317 Updated angel3 migration 2024-07-20 10:23:45 +08:00
Thomas Hii
cb25da3077 Updated Angel3 migration 2024-07-19 07:43:29 +08:00
Thomas
2510b76e80
Merge pull request #142 from dukefirehawk/feature/doc
Updated docker deployment
2024-07-15 07:48:14 +08:00
Thomas Hii
b5b9412814 Merge branch 'master' into feature/doc 2024-07-15 07:43:49 +08:00
Thomas Hii
4f14264d23 Updated docker deployment 2024-07-15 07:35:19 +08:00
Thomas
6c71ee34a7
Merge pull request #141 from Garthi/feature/fix_table_index_setting
add/fix table index setting
2024-07-08 21:06:21 +08:00
Martin Zander
3803fd0ace add standard index handling for mariadb and mysql 2024-07-08 11:59:17 +02:00
Martin Zander
d9e9fe1c38 set IndexType.none as default 2024-07-08 11:53:45 +02:00
Thomas
b71f350d29
Merge pull request #140 from dukefirehawk/feature/discord
Updated README
2024-07-07 23:46:03 +08:00
Thomas Hii
bc5ad58aa5 Updated README 2024-07-07 23:40:44 +08:00
Thomas
f482e4dc58
Merge pull request #139 from dukefirehawk/feature/discord
Feature/discord
2024-07-07 23:08:40 +08:00
Thomas Hii
5c19a002b6 Added pgadmin4 2024-07-07 23:03:07 +08:00
Thomas Hii
6224d359e0 Replaced Gitter with Discord chat 2024-07-07 23:02:49 +08:00
Thomas
564fc5953c
Merge pull request #138 from dukefirehawk/bugfix/rethinkdb
Updated rethinkdb
2024-07-06 20:09:00 +08:00
Thomas Hii
bb093a03f6 Updated rethinkdb 2024-07-06 20:06:27 +08:00
Thomas
3f049465d1
Merge pull request #136 from dukefirehawk/feature/rethinkdb
Feature/rethinkdb
2024-07-06 18:35:02 +08:00
Thomas Hii
184fd15fba Merge branch 'master' into feature/rethinkdb 2024-07-06 18:32:03 +08:00
Thomas
07ea5fe889
Merge pull request #137 from dukefirehawk/fixbug/analyzer
Disable analyze orm_test
2024-07-06 18:30:47 +08:00
Thomas Hii
5daf5390e5 Disable analyze orm_test 2024-07-06 18:28:18 +08:00
Thomas Hii
85eb443f88 Updated mongodb 2024-07-06 18:18:14 +08:00
Thomas Hii
3411e16418 Aded rethinkdb support 2024-07-06 18:15:18 +08:00
Thomas Hii
c18e0dabb5 Added authentication 2024-07-05 00:04:58 +08:00
Thomas Hii
094fe740c0 Updated RethinkDB 2024-07-03 00:13:02 +08:00
Thomas Hii
a0ade9d3a3 Updated to support dart 3 2024-06-30 09:44:37 +08:00
Thomas Hii
5a97dc51fc Added rethinkdb 2024-06-29 17:57:48 +08:00
Thomas Hii
ed0b275479 Added rethinkdb 2024-06-29 17:57:28 +08:00
Thomas
4ceaf7a338
Merge pull request #134 from dukefirehawk/bug-fix/upgrade_dep
Fixed analyzer warnings
2024-06-24 08:14:50 +08:00
Thomas Hii
d57dbae6f9 Fixed anlyzer warnings 2024-06-24 07:54:16 +08:00
Thomas
b39795b67b
Merge pull request #133 from dukefirehawk/bug-fix/upgrade_dep
Bug fix/upgrade dep
2024-06-23 18:11:08 +08:00
Thomas Hii
7e6dc485e9 Updated README 2024-06-23 18:08:12 +08:00
Thomas Hii
0b109cadfe Fixed dependencies 2024-06-23 18:02:36 +08:00
Thomas Hii
d31a07bbab Updated shelf 2024-06-23 17:45:28 +08:00
Thomas
06855d127a
Merge pull request #132 from dukefirehawk/bug-fix/upgrade_dep
Updated dependencies
2024-06-23 17:32:02 +08:00
Thomas Hii
9b164c8740 Updated dependencies 2024-06-23 17:24:53 +08:00
Thomas
6e48fedf5c
Merge pull request #131 from dukefirehawk/bug-fix/upgrade_dep
Updated dependencies
2024-06-23 16:44:54 +08:00
Thomas Hii
ba83f62524 Updated dependencies 2024-06-23 16:42:16 +08:00
Thomas
c308e5193a
Merge pull request #130 from dukefirehawk/bug-fix/upgrade_dep
Updated serializer generator
2024-06-23 14:51:43 +08:00
Thomas Hii
529ab75d94 Updated serializer_generator 2024-06-23 14:47:15 +08:00
Thomas
7aad3e615c
Merge pull request #129 from dukefirehawk/feature/upgrade_sdk
Updated to support SDK 3.3.0
2024-06-23 12:13:38 +08:00
Thomas Hii
205743ed9b Updated to support SDK 3.3.0 2024-06-23 12:09:26 +08:00
Thomas
3c6d2c2e87
Merge pull request #128 from dukefirehawk/feature/upgrade_sdk
Feature/upgrade sdk
2024-06-23 11:24:24 +08:00
Thomas Hii
2139ae4422 Updated mongoDB 2024-06-23 11:15:41 +08:00
Thomas
ab36e7ccac
Merge pull request #127 from Garthi/orm_migration_column_change_fix
change MySQL/MariaDB SQL statement for changeColumnType method
2024-06-22 11:50:21 +08:00
Martin Zander
23a8d94cd0 change MySQL/MariaDB SQL statement for changeColumnType method 2024-06-20 18:04:44 +02:00
Thomas Hii
32a7e88d2d Updated deprecated code 2024-06-16 10:13:53 +08:00
Thomas
2698c4d753
Merge pull request #126 from dukefirehawk/feature/upgrade_sdk
Feature/upgrade sdk
2024-06-03 11:37:00 +08:00
Thomas Hii
e802de14f1 Updated websocket 2024-06-03 11:28:23 +08:00
Thomas Hii
9ba0092b4f Upgraded mongo 2024-06-02 10:37:49 +08:00
Thomas
e2c0230900
Merge pull request #123 from dukefirehawk/feature/upgrade_sdk
Feature/upgrade sdk
2024-05-23 22:10:36 +08:00
Thomas Hii
b76ff8195c Merge branch 'master' into feature/upgrade_sdk 2024-05-23 22:02:03 +08:00
Thomas
d56ae5b139
Merge pull request #125 from dukefirehawk/feature/workflow
Updated workflow
2024-05-23 22:00:05 +08:00
Thomas Hii
dff56a5034 Updated workflow 2024-05-23 21:55:09 +08:00
Thomas Hii
6a9eb9e5d6 Merge branch 'master' into feature/upgrade_sdk 2024-05-22 00:56:37 +08:00
Thomas
f00f24899d
Merge pull request #124 from dukefirehawk/feature/update_workflow
Update workflow dart sdk
2024-05-22 00:54:20 +08:00
Thomas Hii
1727700763 Update workflow dart sdk 2024-05-22 00:45:26 +08:00
Thomas Hii
1e3ead968a Fixed analyze issues 2024-05-22 00:32:59 +08:00
Thomas Hii
1362002e8c Updated lints 2024-05-22 00:26:09 +08:00
Thomas
e1679a5115
Merge pull request #121 from dukefirehawk/master
Update README
2024-02-19 10:13:45 +08:00
thomashii
5c5aad6da0 Updated pubspec 2024-02-18 18:56:40 +08:00
thomashii
5c3120f058 Updated pubspec 2024-02-18 18:52:12 +08:00
thomashii
64771fb470 Updated README 2024-02-18 12:15:08 +08:00
Thomas
c2cef6c68e
Merge pull request #120 from dukefirehawk/feature/upgrade_postgres
Feature/upgrade postgres
2024-02-18 12:11:13 +08:00
thomashii
630f7c16ec Updated postgres configurations 2024-02-18 12:03:36 +08:00
thomashii
bee328e1c1 Updated postgres 2024-02-17 19:18:23 +08:00
Thomas
196ae6a68c
Merge pull request #119 from dukefirehawk/feature/readme
Updated funding info
2024-02-12 13:07:49 +08:00
thomashii
d1bbad88d9 Updated funding info 2024-02-12 13:03:40 +08:00
Thomas
d26c50ae70
Update FUNDING.yml 2024-02-12 12:39:04 +08:00
Thomas
2a7be6a886
Update FUNDING.yml 2024-02-12 12:36:14 +08:00
thomashii
fe44b0f60b Updated to support postgresql 3 driver 2024-02-12 12:31:33 +08:00
thomashii
ae3544396c Updated change log 2024-01-25 12:48:43 +08:00
thomashii
b9b59523ef Updated migration runner 2024-01-25 12:14:23 +08:00
thomashii
cc362fb704 Updated postgresql pool 2024-01-13 17:50:20 +08:00
thomashii
ea528abc3d Updated to postgres 3 2024-01-06 18:33:09 +08:00
Thomas
1580cc98e6
Merge pull request #117 from dukefirehawk/feature/update_links
Updated repository links
2023-12-25 12:05:07 +08:00
thomashii@dukefirehawk.com
613a24c89a Updated repository links 2023-12-25 11:45:10 +08:00
Thomas
c1dbc6ed8a
Merge pull request #116 from dukefirehawk/feature/upgrade_deps
Feature/upgrade deps
2023-12-25 09:36:00 +08:00
thomashii@dukefirehawk.com
124376e22c Updated to lints 3.0.0 2023-12-25 00:10:10 +08:00
thomashii@dukefirehawk.com
8f96e89b41 Updated to lints 3.0.0 2023-12-24 12:15:26 +08:00
thomashii@dukefirehawk.com
e9fe8dfe26 Updated to lints 3.0.0 2023-12-24 11:27:17 +08:00
thomashii@dukefirehawk.com
6fd8f56b52 Updated linter to 3.0.0 2023-12-24 10:39:45 +08:00
thomashii@dukefirehawk.com
d4794dbbd1 Upgraded lints to 3.0.0 2023-12-24 09:52:57 +08:00
thomashii@dukefirehawk.com
cfe1ef8189 Updated README 2023-11-13 10:20:29 +08:00
thomashii@dukefirehawk.com
4fdd0133a3 Fixed pubspec issue 2023-11-13 10:10:06 +08:00
thomashii@dukefirehawk.com
cf11cc2d3c Updated Hot 2023-11-13 10:08:33 +08:00
thomashii@dukefirehawk.com
52c36cdcc2 Updated README 2023-11-13 09:52:54 +08:00
Thomas
a1c65849b9
Merge pull request #115 from dukefirehawk/bug-fix/72
Bug fix/72
2023-11-13 09:45:55 +08:00
thomashii@dukefirehawk.com
94d1c5affd Added comments 2023-11-13 09:34:01 +08:00
thomashii@dukefirehawk.com
85a5c45a13 Updated response header 2023-11-13 09:02:46 +08:00
thomashii@dukefirehawk.com
26c39effec Updated framework and production 2023-11-13 08:59:18 +08:00
thomashii@dukefirehawk.com
46f5bfb600 Updated to suport melos 3 2023-11-05 18:12:20 +08:00
thomashii@dukefirehawk.com
0ce4741a49 Published validate and test 2023-11-05 18:07:52 +08:00
Thomas
ae60a4f3e2
Merge pull request #112 from dukefirehawk/bug-fix/108
Bug fix/108
2023-11-05 17:41:48 +08:00
thomashii@dukefirehawk.com
84a06843e0 Fixed mismatch messages 2023-11-05 17:34:41 +08:00
thomashii@dukefirehawk.com
e657b2070d Fixed hasValidBody exception 2023-11-04 10:18:44 +08:00
Thomas
1496d61a1c
Merge pull request #111 from dukefirehawk/bug-fix/validate
Updated validate null check
2023-10-29 18:07:02 +08:00
thomashii@dukefirehawk.com
834406de2d Updated validate null check 2023-10-29 15:02:05 +08:00
Thomas
eb6d4e6d10
Merge pull request #110 from dukefirehawk/bug-fix/validate
Bug fix/validate
2023-10-29 14:11:08 +08:00
thomashii@dukefirehawk.com
0ca3eb7e01 Added complex test cases to validate 2023-10-29 14:03:23 +08:00
thomashii@dukefirehawk.com
3afc91edfa Updated shelf 2023-10-28 00:01:21 +08:00
thomashii@dukefirehawk.com
6506a3e0de Updated validate 2023-10-27 23:52:29 +08:00
thomashii@dukefirehawk.com
e78f68487d Updated broken image 2023-10-19 07:55:23 +08:00
thomashii@dukefirehawk.com
21bc260ec3 Fixed broken logo 2023-10-19 07:48:24 +08:00
thomashii@dukefirehawk.com
a51d09eab0 Updated README 2023-10-19 00:02:35 +08:00
thomashii@dukefirehawk.com
4cca844b89 Published updates 2023-10-18 23:45:31 +08:00
thomashii@dukefirehawk.com
65ce31a8cf Updated logo 2023-10-18 22:21:24 +08:00
thomashii@dukefirehawk.com
0285cdbd74 Added white logo 2023-10-09 23:52:23 +08:00
thomashii@dukefirehawk.com
fc5fb9aea7 Updated logo 2023-10-08 23:51:41 +08:00
Thomas Hii
811e68de70
Merge pull request #107 from dukefirehawk/feature/upgrade_sdk
Feature/upgrade sdk
2023-10-08 12:20:09 +08:00
thomashii@dukefirehawk.com
799f94bb60 Updated logo 2023-10-08 11:29:28 +08:00
thomashii@dukefirehawk.com
c29c7b7049 Moved experiment to belatuk_rnd 2023-09-24 10:20:56 +08:00
thomashii@dukefirehawk.com
630c527381 Upgrade library 2023-09-23 11:31:46 +08:00
thomashii@dukefirehawk.com
4dcf6883d0 Updated libraries 2023-09-22 00:24:50 +08:00
Thomas Hii
bfd05b6854
Merge pull request #104 from dukefirehawk/bug-fix/serialize_generator
Bug fix/serialize generator
2023-06-25 09:53:34 +08:00
thomashii
393281c903 Fixed duplicated fields 2023-06-25 09:46:06 +08:00
thomashii
131a60467b Updated README 2023-06-17 15:07:19 +08:00
thomashii
dc5600a9cb Published file_service 2023-06-17 15:04:17 +08:00
thomashii
df3f3dfd02 Updated README 2023-06-10 12:20:53 +08:00
thomashii
113c1b7cd4 Updated README 2023-06-10 12:13:53 +08:00
thomashii
d6960acfbf Published 8.0.0 2023-06-10 12:10:21 +08:00
Thomas Hii
b83adcd51a
Merge pull request #102 from dukefirehawk/feature/v8
Feature/v8
2023-06-09 00:52:09 +08:00
thomashii
6772ebbf31 Fixed warning 2023-06-09 00:49:42 +08:00
thomashii
d0363fd6fe Merge branch 'master' into feature/v8 2023-06-09 00:36:32 +08:00
thomashii
ab66012ef1 Updated to dart 3.0.3 2023-06-09 00:27:36 +08:00
thomashii
048f06bc42 Temporarily disable publish 2023-06-08 01:13:49 +08:00
thomashii
b52e5aed39 Updated README 2023-06-08 00:45:33 +08:00
thomashii
f59b309327 Fixed Basic Auth issue 2023-06-08 00:42:34 +08:00
thomashii
a806d7c6db Fixed auth failed test cases 2023-06-05 19:00:42 +08:00
thomashii
8e251e553a Refactored 2023-06-04 13:20:42 +08:00
thomashii@dukefirehawk.com
1e616f3f5c Fixed auth 2023-06-03 10:32:46 +08:00
thomashii@dukefirehawk.com
4ebb63c5f7 Fixed Auth failed test cases 2023-06-03 10:29:43 +08:00
Thomas Hii
1d00088d89 Update test cases 2023-05-31 16:44:37 +00:00
Thomas Hii
764829b01a Updated test 2023-05-31 16:25:42 +00:00
Thomas Hii
adf380dc54 Updated auth 2023-05-31 15:24:09 +00:00
thomashii@dukefirehawk.com
e5743b95e2 Fixed bug for Auth 2023-05-30 19:49:02 +08:00
thomashii@dukefirehawk.com
7f3eba8538 Updated to support dart 3 2023-05-27 15:38:50 +08:00
thomashii@dukefirehawk.com
f2c9ab23eb Updated Jinja 2023-05-27 15:07:30 +08:00
thomashii@dukefirehawk.com
82b78fdaef Updated to support dart 3 2023-05-27 10:08:51 +08:00
thomashii@dukefirehawk.com
d440ebd649 Updated oauth 2023-05-27 09:33:53 +08:00
thomashii@dukefirehawk.com
dad2106021 Updated cache and cors to Dart 3 2023-05-27 08:56:05 +08:00
thomashii@dukefirehawk.com
79b3417fcc Updated generated models 2023-05-27 08:39:42 +08:00
thomashii@dukefirehawk.com
435fbe4e1a Updated ORM 2023-05-27 08:37:00 +08:00
thomashii@dukefirehawk.com
a1f0512f5a Updated serialize to Dart 3 2023-05-27 07:59:53 +08:00
thomashii@dukefirehawk.com
97e9c6caf1 Updated static 2023-05-27 07:45:57 +08:00
thomashii@dukefirehawk.com
7a9362fc56 Updated production and hot to Dart 3 2023-05-27 07:42:46 +08:00
thomashii@dukefirehawk.com
981397791a Updated JAEL to Dart 3 2023-05-27 07:27:47 +08:00
thomashii@dukefirehawk.com
85e7463afc Upgraded to Dart 3 2023-05-27 06:58:32 +08:00
thomashii@dukefirehawk.com
f3a1ede6fb Upgraded client 2023-05-22 23:57:23 +08:00
thomashii@dukefirehawk.com
2933dbc191 Upgraded client 2023-05-22 23:50:41 +08:00
Thomas Hii
3f77318e80 Updated change log 2023-05-21 11:09:39 +00:00
Thomas Hii
f89d15b1f4 Updated validate 2023-05-21 11:06:47 +00:00
Thomas Hii
b8475b01b8 Updated configuration 2023-05-21 11:02:54 +00:00
Thomas Hii
b2618316ef Updated auth 2023-05-21 09:29:15 +00:00
thomashii@dukefirehawk.com
1301b492f7 Updated framework 2023-05-21 09:20:55 +08:00
thomashii@dukefirehawk.com
fb99b0b4ec Upgraded container_generator 2023-05-21 09:05:14 +08:00
thomashii@dukefirehawk.com
7ed8589754 Updated container 2023-05-21 08:57:13 +08:00
thomashii@dukefirehawk.com
c2191a8c9c Updated mock_request 2023-05-21 08:53:53 +08:00
thomashii@dukefirehawk.com
16bf2ddfc6 Upgraded model 2023-05-21 08:26:04 +08:00
thomashii@dukefirehawk.com
9626cc93a4 Updated route 2023-05-21 08:13:59 +08:00
thomashii@dukefirehawk.com
1f0e61958f Updated README 2023-05-21 08:02:05 +08:00
Thomas Hii
193fa6c94a Updated route 2023-05-20 23:55:42 +00:00
Thomas Hii
2058e4b2f1 Added development instructions 2023-05-20 23:40:23 +00:00
Thomas Hii
5ce990ccbf Updated to Dart 3 2023-05-20 15:39:47 +00:00
Thomas Hii
c96454fab1 Updated to Dart 3 2023-05-20 15:37:23 +00:00
thomashii@dukefirehawk.com
22d3c29857 Merge branch 'master' into feature/container_generator 2023-04-23 13:03:00 +08:00
Thomas Hii
ae5a714d9c
Merge pull request #101 from dukefirehawk/feature/upgrade-sdk
Updated SDK
2023-04-22 23:15:44 +08:00
thomashii@dukefirehawk.com
9d8c5ae2f1 Updated SDK 2023-04-22 22:47:19 +08:00
thomashii@dukefirehawk.com
c6ca7b4e65 Bumped to Dart >= 2.19 2023-04-22 13:41:41 +08:00
thomashii@dukefirehawk.com
cc7e3a255e Updated serialize generator 2023-04-21 14:25:54 +08:00
thomashii@dukefirehawk.com
71b7d54763 Updated angel container generator 2023-04-15 11:19:52 +08:00
thomashii@dukefirehawk.com
d034fcebe8 Fixed EmptyReflector 2023-04-15 11:05:33 +08:00
thomashii@dukefirehawk.com
83873d0fb7 Updated README 2023-04-15 09:09:23 +08:00
thomashii@dukefirehawk.com
168c51074b Published angel2_container 2023-04-15 09:07:24 +08:00
thomashii@dukefirehawk.com
bdf7d33c54 Merged master 2023-04-15 07:33:44 +08:00
Thomas Hii
7575a561bb
Merge pull request #99 from BenVercammen/enum-serializer-support
Use @SerializableField properties in Query.parseRow
2023-03-24 18:01:03 +08:00
Ben Vercammen
c307147780 chore: formatted files 2023-03-22 08:31:45 +01:00
Ben Vercammen
0d969aa7f9 test: additional test for parsing enum field with @SerializableField(serializer: ..., deserializer: ...) 2023-03-22 08:31:45 +01:00
Ben Vercammen
966622ed2f feat: Take @SerializableField properties into account when generating Migration (#98) 2023-03-22 08:31:45 +01:00
Ben Vercammen
95f425021a feat: Take @SerializableField properties into account when generating Query.parseRow (#98) 2023-03-22 08:31:45 +01:00
Thomas Hii
fcadbd4ccb
Merge pull request #96 from BenVercammen/mariadbrunner-fix
MariaDbMigrationRunner assumed "batch" column to be string, but was int
2023-03-22 07:51:24 +08:00
Ben Vercammen
fd5f726e2f chore: temporarily added dependency_overrides for testing 2023-03-21 21:53:28 +01:00
Ben Vercammen
5634447337 test: added possibility to use MySQL server without SSL (for localhost testing purposes) 2023-03-21 20:36:51 +01:00
Ben Vercammen
f51171faa8 chore: added workspace level pubspec.yaml file, required for melos 3.0 2023-03-21 19:05:19 +01:00
thomashii@dukefirehawk.com
0d4c90a129 Merge branch 'master' into feature/container_generator 2023-03-11 14:47:29 +08:00
thomashii@dukefirehawk.com
9290bce457 Updated README 2023-03-11 14:42:29 +08:00
thomashii@dukefirehawk.com
a2fafe6d8e Updated README 2023-03-11 13:46:54 +08:00
thomashii@dukefirehawk.com
08ba4f0609 Updated Generated Container 2023-03-11 12:44:22 +08:00
Ben Vercammen
0905afecbd Fixed MariaDbMigrationRunner, which assumed "batch" column to be string instead of int 2023-03-07 09:15:39 +01:00
Thomas Hii
05cbd71248 Added example 2023-01-29 16:04:15 +00:00
Thomas Hii
342a5a4ac9 Test Annotation 2023-01-29 14:54:00 +00:00
thomashii@dukefirehawk.com
ec68a78c1d Test reflection 2023-01-29 20:26:35 +08:00
Thomas Hii
9b85007072
Merge pull request #94 from dukefirehawk/bug-fix/container
Bug fix/container
2023-01-28 10:56:52 +08:00
thomashii@dukefirehawk.com
bddd9fbfb8 Fixed missing parameter 2023-01-28 10:39:54 +08:00
thomashii@dukefirehawk.com
87910959fa Updated test cases 2023-01-28 10:26:27 +08:00
Thomas Hii
55ecadce60 Added example for testing 2023-01-25 02:23:40 +00:00
Thomas Hii
f5735ad919
Updated to use official dart image 2023-01-23 16:22:19 +08:00
Thomas Hii
ac1aa898f0
Added devcontainer.json 2023-01-23 15:19:33 +08:00
thomashii@dukefirehawk.com
86538f7af1 Updated models 2023-01-02 09:01:11 +08:00
thomashii@dukefirehawk.com
7809c72f03 Updated container 2022-12-29 00:25:55 +08:00
thomashii@dukefirehawk.com
14a7b82616 Updated test cases 2022-12-28 06:59:40 +08:00
Thomas Hii
959078fa95
Merge pull request #90 from dukefirehawk/bug-fix/analyzer
Fixed analyzer
2022-12-25 12:47:22 +08:00
thomashii@dukefirehawk.com
2c74a1d158 Fixed analyzer 2022-12-25 12:32:26 +08:00
thomashii@dukefirehawk.com
f777776df0 Published orm_generator 2022-12-17 20:24:22 +08:00
Thomas Hii
c83ba22439
Merge pull request #89 from dukefirehawk/bug-fix/deprecated
Fixed angel3_orm_generator
2022-12-17 18:25:16 +08:00
thomashii@dukefirehawk.com
359ed6bf47 Updated container 2022-12-17 18:14:06 +08:00
thomashii@dukefirehawk.com
4a3b354c92 Fixed angel3_orm_generator 2022-12-17 17:59:00 +08:00
thomashii@dukefirehawk.com
fecead4a90 Updated pubspec files 2022-12-03 12:07:35 +08:00
Thomas Hii
a7c750e70f
Merge pull request #87 from dukefirehawk/feature/fix-deprecated
Feature/fix deprecated
2022-12-03 11:31:57 +08:00
thomashii@dukefirehawk.com
cf8d9814e8 Fixed Enum null check warnings 2022-12-03 11:14:24 +08:00
thomashii@dukefirehawk.com
56e0e7a05a Fixed dependencies 2022-11-19 08:36:51 +08:00
thomashii@dukefirehawk.com
d3c672823a Upgraded required SDK >= 2.18.0 2022-11-19 08:26:45 +08:00
thomashii@dukefirehawk.com
0fa22e65e4 Upgraded to analyzer 5.x.x 2022-11-19 01:59:34 +08:00
thomashii@dukefirehawk.com
bfc94d94eb Fixed linter warnings 2022-11-18 21:52:12 +08:00
thomashii@dukefirehawk.com
529d2d20ad Compressed archived packages 2022-11-18 21:43:50 +08:00
Thomas Hii
1f5e12a8cf
Merge pull request #86 from dukefirehawk/bug-fix/83
Fixed issue 83
2022-10-06 08:11:04 +08:00
thomashii@dukefirehawk.com
8c48be9f9f Fixed issue 83 2022-10-06 08:00:03 +08:00
Thomas Hii
b9b0e49fd0
Merge pull request #85 from dukefirehawk/bug-fix/deprecated
Fixing warnings
2022-10-03 23:34:17 +08:00
thomashii@dukefirehawk.com
5e658703fa Updated README 2022-10-03 23:31:46 +08:00
thomashii@dukefirehawk.com
6a33545037 Fixing warnings 2022-10-03 23:22:39 +08:00
thomashii@dukefirehawk.com
6a7e251fee Updated yaml files 2022-10-03 07:35:05 +08:00
Thomas Hii
681e91d024
Merge pull request #84 from dukefirehawk/bug-fix/82
Fixed issue #82
2022-10-02 22:24:39 +08:00
thomashii@dukefirehawk.com
b0d792602a Fixed issue #82 2022-10-02 22:18:12 +08:00
Thomas Hii
87d446c495
Merge pull request #81 from dukefirehawk/bug-fix/deprecated
Bug fix/deprecated
2022-09-19 22:34:25 +08:00
thomashii@dukefirehawk.com
47b658ee3a Fixed deprecated warnings 2022-09-19 22:28:39 +08:00
thomashii@dukefirehawk.com
9a5201b6f0 Fixed deprecated warnings 2022-09-19 00:58:28 +08:00
Thomas Hii
41167e01bd
Merge pull request #79 from dukefirehawk/feature/perf-2
Removed debugging messages
2022-08-31 22:56:04 +08:00
thomashii@dukefirehawk.com
71b50452ec Removed debugging messages 2022-08-31 22:48:27 +08:00
Thomas Hii
272363052b
Merge pull request #78 from dukefirehawk/feature/perf-1
Reduced debugging verbosity
2022-08-31 21:35:11 +08:00
thomashii@dukefirehawk.com
5fd3f4d5d2 Reduced debugging verbosity 2022-08-31 21:16:32 +08:00
thomashii@dukefirehawk.com
1708c1f870 Resolved shelf warnings 2022-08-29 21:32:12 +08:00
thomashii@dukefirehawk.com
308d6df606 Updated pubspec 2022-08-29 01:51:56 +08:00
Thomas Hii
6416811dea
Merge pull request #77 from dukefirehawk/feature/v7
Feature/v7
2022-08-27 18:16:04 +08:00
thomashii@dukefirehawk.com
06d4d4659d Updated to dart 2.17.0 2022-08-27 18:12:20 +08:00
thomashii@dukefirehawk.com
43ea7ae60a Fixed framework analysis warnings 2022-08-27 17:49:56 +08:00
thomashii@dukefirehawk.com
3fad3ee34b Fixed static analysis warnings 2022-08-27 17:46:16 +08:00
thomashii@dukefirehawk.com
c52bc61e49 Fixed test analysis warnings 2022-08-27 17:25:39 +08:00
thomashii@dukefirehawk.com
52a3a3a3ab Fixed production analyze warnings 2022-08-27 17:23:41 +08:00
thomashii@dukefirehawk.com
ba247bd388 Updated change log 2022-08-27 17:18:12 +08:00
thomashii@dukefirehawk.com
0301b300ad Fixed issue #75 2022-08-27 17:16:39 +08:00
thomashii@dukefirehawk.com
cec05d8c19 Fixed ORM analysis warnings 2022-08-27 16:58:45 +08:00
thomashii@dukefirehawk.com
729a7740db Fixed security analysis warnings 2022-08-27 16:01:12 +08:00
thomashii@dukefirehawk.com
45218176c7 Fixed oauth2 analysis warnings 2022-08-27 15:52:28 +08:00
thomashii@dukefirehawk.com
3fe1778c27 Fixed client analysis warnings 2022-08-27 15:49:21 +08:00
thomashii@dukefirehawk.com
e219b91424 Fixed jael_web analysis warnings 2022-08-27 15:42:49 +08:00
thomashii@dukefirehawk.com
6a34b51f04 Fixed jael_web analysis warnings 2022-08-27 15:37:20 +08:00
thomashii@dukefirehawk.com
2c52e4a5d5 Fixed seralize_generator warnings 2022-08-27 14:01:27 +08:00
thomashii@dukefirehawk.com
eabe3b3810 Fixed seralize_generator analysis warnings 2022-08-20 09:12:15 +08:00
thomashii@dukefirehawk.com
1540394586 Updates websocket analysis warnings 2022-08-18 21:33:58 +08:00
thomashii@dukefirehawk.com
0043114180 Fixed validator analysis warnings 2022-08-17 20:15:23 +08:00
thomashii@dukefirehawk.com
33ba0c69ca Fixed cache analysis warnings 2022-08-17 20:06:27 +08:00
thomashii@dukefirehawk.com
7d8677e308 Fixed static analysis warnings 2022-08-17 11:25:45 +08:00
thomashii@dukefirehawk.com
f00d3916f6 Fixed route analysis warnings 2022-08-17 11:21:47 +08:00
thomashii@dukefirehawk.com
5402fa55a9 Fixed auth analysis warnings 2022-08-17 11:17:00 +08:00
thomashii@dukefirehawk.com
ba26c88d6b Updated logger 2022-08-17 11:10:45 +08:00
thomashii@dukefirehawk.com
4a48000bc3 Fixed framework analysis warnings 2022-08-17 11:05:48 +08:00
thomashii@dukefirehawk.com
5bea55d2c0 Updated Change Log 2022-08-16 19:19:04 +08:00
thomashii@dukefirehawk.com
3f4ff925dc Upgraded to min SDK 2.17 2022-08-14 10:17:59 +08:00
thomashii@dukefirehawk.com
1560e147cc Updated min SDK to 2.17 2022-08-13 10:14:43 +08:00
thomashii@dukefirehawk.com
d1d63ca834 Updated pubspec for release 2022-07-31 00:01:02 +08:00
Thomas Hii
f93f921162
Merge pull request #74 from dukefirehawk/bug-fix/orm-generator
Bug fix/orm generator
2022-07-30 23:28:03 +08:00
thomashii@dukefirehawk.com
c30609f955 Fixed postgreSQL failed test cases 2022-07-30 23:08:38 +08:00
thomashii@dukefirehawk.com
3db9c53fdd Reverted lints to 1.x.x 2022-07-28 01:03:31 +08:00
thomashii@dukefirehawk.com
98dfef8e33 Fixed migration runner for MySQL 2022-07-27 22:21:36 +08:00
thomashii@dukefirehawk.com
aff68b2f07 Updated temporal mapping 2022-07-24 13:10:23 +08:00
thomashii@dukefirehawk.com
572a134c9c Fixed temporal mapping 2022-07-24 12:00:10 +08:00
thomashii@dukefirehawk.com
793a8ac115 Updated DateTime to non UTC 2022-07-16 10:44:49 +08:00
thomashii@dukefirehawk.com
f0a5e7c6fc Added database connection retry 2022-07-11 14:15:02 +08:00
thomashii
a5f4e4ff7a Fixed linter warnings 2022-06-18 21:35:19 +08:00
thomashii
a6681dbdab Updated ORM 2022-06-16 10:14:17 +08:00
thomashii
6c51e7a231 Added default to Column 2022-06-14 11:19:24 +08:00
thomashii
224d2be026 Fixed issue 70 2022-06-11 14:39:29 +08:00
thomashii
da5b87043d Updated ORM 2022-06-11 00:44:09 +08:00
thomashii@dukefirehawk.com
a714059cb9 Fixed issue 68 2022-06-04 09:50:58 +08:00
Thomas Hii
b185baec7b
Merge pull request #69 from dukefirehawk/feature/auth_twitter
Added Twitter OAuth1
2022-06-04 09:38:06 +08:00
thomashii@dukefirehawk.com
c96980a887 Added Twitter OAuth1 2022-06-04 09:30:18 +08:00
Thomas Hii
a226d29514
Merge pull request #67 from dukefirehawk/feature/update-markdown
Updated markdown
2022-05-29 09:14:09 +08:00
thomashii@dukefirehawk.com
c89983cb96 Updated markdown 2022-05-29 08:31:30 +08:00
thomashii@dukefirehawk.com
a75182565f Updated angel3_orm_generator 2022-05-28 08:33:09 +08:00
Thomas Hii
55c4199b6a
Merge pull request #66 from dukefirehawk/feature/update-analyzer
Updated analyzer
2022-05-28 08:19:11 +08:00
thomashii
1f3dc36604 Updated analyzer 2022-05-28 01:09:09 +08:00
thomashii
d28930d3c1 Updated pubspec 2022-05-16 13:20:14 +08:00
Thomas Hii
f4ba4fb25c
Merge pull request #65 from dukefirehawk/fix-bug/mysql-query
Fix bug/mysql query
2022-05-16 13:09:36 +08:00
thomashii
03885543c2 Fixed failed test cases 2022-05-16 13:04:21 +08:00
thomashii
178bc924c1 Updated ORM Mysql 2022-05-07 15:23:58 +08:00
Thomas Hii
ae0120398c
Merge pull request #64 from dukefirehawk/fix-bug/orm-mysql
Fix bug/orm mysql
2022-05-01 17:46:46 +08:00
thomashii
88643bd6f2 Updated Change Log 2022-05-01 17:40:42 +08:00
thomashii
da1faa3ce3 Fixed migration for MySQL 2022-05-01 17:16:14 +08:00
thomashii
4ba42fca73 Fixed MariaDB migration 2022-04-30 10:11:22 +08:00
thomashii
d845259edb Fixed oauth exception 2022-04-25 09:28:07 +08:00
Thomas Hii
da49c74f7b
Merge pull request #63 from dukefirehawk/fix-bug/oauth2
Fixed http exception error
2022-04-25 09:05:11 +08:00
thomashii
1717897b9a Fixed http exception error 2022-04-25 08:54:13 +08:00
Thomas Hii
2ed19c08cc
Merge pull request #62 from dukefirehawk/fix-bug/jael
Fixed JAEL
2022-04-24 19:09:53 +08:00
thomashii
3cbba10c36 Fixed JAEL 2022-04-24 18:53:41 +08:00
thomashii
bddc53e0c1 Updated orm_mysql 2022-04-24 11:01:57 +08:00
thomashii
c1755cf156 Updated mysql ORM README 2022-04-24 10:59:03 +08:00
thomashii
579cbbfe26 Published 6.0.0 2022-04-24 09:42:33 +08:00
thomashii
ab2c8d0ad2 Updated README 2022-04-24 08:55:17 +08:00
thomashii
38073e5b61 Cleanup unused 2022-04-23 16:51:55 +08:00
Thomas Hii
3375d50e68
Merge pull request #60 from dukefirehawk/release/6.0.0
Release/6.0.0
2022-04-23 13:48:32 +08:00
thomashii
2ee12efede Updated SDK 2022-04-23 13:40:31 +08:00
thomashii
47cbaacef2 Updated to SDK 2.16.x 2022-04-23 12:21:39 +08:00
thomashii
9382529ad7 Updated README 2022-03-20 08:55:30 +08:00
thomashii
d33faeacce Updated melos 2022-03-20 08:38:59 +08:00
thomashii
5f07290573 Added melos 2022-03-19 09:37:28 +08:00
thomashii
de299e9c99 Updated log message 2022-03-18 09:27:52 +08:00
thomashii
28aa31a89b Updated log message 2022-03-18 09:25:36 +08:00
thomashii
5616303535 Updated file_service 2022-03-18 08:00:20 +08:00
thomashii
99cf7790a4 Updated file_service 2022-03-18 07:57:20 +08:00
thomashii
174388e075 Updated ORM 2022-02-27 12:30:22 +08:00
thomashii
0dc71df45a Updated serialise 2022-02-27 12:16:31 +08:00
thomashii
f5c2598cbd Updated cors, mongo 2022-02-27 09:19:15 +08:00
thomashii
f0255b3cd6 Updated configuration 2022-02-24 08:36:51 +08:00
thomashii
4466926d31 Updated ORM 2022-02-24 08:34:51 +08:00
thomashii
e409e19563 Updated cors and configuration 2022-02-24 08:32:54 +08:00
thomashii
510594d96e Updated JAEL 2022-02-22 19:41:06 +08:00
thomashii
49da5f76b1 Updated websocket,test and static 2022-02-22 08:07:01 +08:00
thomashii
48a441cf77 Updated auth, client and validate packages 2022-02-21 09:17:27 +08:00
thomashii
6db69d0fb1 Upgraded production 2022-02-20 10:00:51 +08:00
thomashii
ff65e13c75 Added default logging 2022-02-20 09:48:12 +08:00
thomashii
6d2be10536 Removed dependency on mirror 2022-02-19 20:24:34 +08:00
thomashii
8469a05ff0 Merge branch 'feature/refactor_framework' into release/5.0.0 2022-02-15 08:48:48 +08:00
thomashii
35bf04b168 Merge branch 'fix-bug/mysql8' into release/5.0.0 2022-02-14 08:20:39 +08:00
thomashii
dfd974c106 Updated to 6.0.0 2022-02-14 00:48:37 +08:00
thomashii
0235039719 Updated pubspec 2022-02-13 21:01:10 +08:00
thomashii
f9b07b2477 Updated ORM generator 2022-02-07 20:42:32 +08:00
thomashii
f28ba22bb4 Fixed insert into table without primary key 2022-02-06 15:27:19 +08:00
thomashii
cd31c040ba Updated ORM insert for MySQL 2022-02-03 17:47:36 +08:00
Thomas Hii
bab4e5eaf6
Merge pull request #49 from dukefirehawk/fix-bug/pr48
Fixed issue 48
2022-01-23 13:14:59 +08:00
thomashii
b55489974f Fixed dev logging 2022-01-23 13:10:50 +08:00
thomashii
2518e36e08 Published ORM 2022-01-14 01:18:40 +08:00
Thomas Hii
1c1a9de7f5
Merge pull request #47 from debuggerx-dev/master
fix wrong sql generated when using multi 'orderBy'
2022-01-12 18:45:02 +08:00
debuggerx01
9637c25a97
Update query.dart
clean code
2022-01-11 19:27:50 +08:00
debuggerx01
abc1153076 fix action error 2022-01-11 18:08:13 +08:00
debuggerx01
d8dcfe8bef fix error 2022-01-11 18:03:25 +08:00
debuggerx01
8a698f79a7 format code 2022-01-11 17:58:22 +08:00
debuggerx01
63b7c53d7f fix multi order by error 2022-01-11 17:53:14 +08:00
debuggerx01
97855f4bf4 fix_multi_order_by 2022-01-11 17:46:56 +08:00
thomashii
9d161b91d4 Merge branch 'master' of https://github.com/dukefirehawk/angel 2022-01-08 17:27:44 +08:00
thomashii
1c5f0a9d08 Updated README 2022-01-08 17:27:20 +08:00
thomashii
7245a45fbe Published ORM 2022-01-08 17:07:26 +08:00
Thomas Hii
9fa24a64c7
Merge pull request #46 from dukefirehawk/feature/github-action
Testing github action
2022-01-08 16:20:22 +08:00
thomashii
2f6b964807 Updated README 2022-01-08 16:16:50 +08:00
thomashii
df52801c66 Fixed failed test cases for github action 2022-01-08 16:01:30 +08:00
thomashii
cad8ae2e60 Updated action 2022-01-08 15:49:43 +08:00
thomashii
ac91cde03d Setup ORM automated tests 2022-01-08 15:38:18 +08:00
thomashii
339fc08e15 Added ORM postgresql action 2022-01-08 14:59:52 +08:00
thomashii
44fc43a9e2 Updated ORM test 2022-01-08 14:36:42 +08:00
thomashii
c2faa16768 Added ORM test action 2022-01-08 14:20:42 +08:00
thomashii
699e009899 Added ORM generator action 2022-01-08 14:03:19 +08:00
thomashii
8efc47630e Fixed ORM formatting 2022-01-08 13:54:40 +08:00
thomashii
27c79d601e Fixed ORM analyser error 2022-01-08 13:52:34 +08:00
thomashii
7fbe1c4b7a Fixed ORM analyzer error 2022-01-08 13:45:58 +08:00
thomashii
f7b8d93a23 Fixed ORM analyzer error 2022-01-08 13:41:02 +08:00
Thomas Hii
8adb18662d
Merge pull request #43 from debuggerx01/master
Add 'where.raw(String whereSql)'
2022-01-08 13:33:39 +08:00
thomashii
40b058e0e0 Added ORM action 2022-01-08 13:23:54 +08:00
thomashii
90178066be Fixed framework failed test cases 2022-01-08 13:00:36 +08:00
thomashii
40542c35cc Updated framework code format 2022-01-08 12:51:18 +08:00
thomashii
06d53d6f99 Updated github action 2022-01-08 12:44:45 +08:00
Thomas Hii
3ffe640033
Create dart.yml 2022-01-08 12:37:05 +08:00
debuggerx
7d6e869999 add join_test to angel_orm_test 2022-01-07 16:19:33 +08:00
debuggerx01
a34ce2393c
Merge branch 'dukefirehawk:master' into master 2022-01-07 00:09:22 +08:00
Thomas Hii
7f82d8b941
Merge pull request #44 from dukefirehawk/fix-bug/pr42
Updated ORM
2022-01-06 21:16:29 +08:00
thomashii
399eebc67c Updated ORM 2022-01-06 20:59:02 +08:00
debuggerx01
a21b5a35e3 Add Where.raw(String where Sql)' to use join table fields as query conditions 2022-01-06 12:06:56 +08:00
thomashii
3bdee0bb7d Updated migration 2022-01-05 17:11:50 +08:00
Thomas Hii
1b306aeffe
Merge pull request #42 from debuggerx01/master
add 'select(List<String> fields)' function to orm_generator.
2022-01-05 16:14:54 +08:00
thomashii
6325185f4e Updated to lints linter 2022-01-05 12:03:02 +08:00
Thomas Hii
09acfe8a4c
Merge pull request #41 from dukefirehawk/feature/update-linter
Updated to lints linter
2022-01-04 20:06:48 +08:00
thomashii
5b84a8a124 Updated linter 2022-01-04 20:03:52 +08:00
debuggerx01
2c76702e44 add 'select(List<String> fields)' function to orm_generator. 2022-01-04 19:52:12 +08:00
thomashii
9d0fbf9c81 Updated http exception 2022-01-03 15:51:05 +08:00
Thomas Hii
262043861d
Merge pull request #40 from dukefirehawk/feature/update-hot
Updated Hot
2022-01-03 14:49:38 +08:00
thomashii
9db875329d Updated Hot 2022-01-03 14:45:47 +08:00
thomashii
57f4c0d618 Updated 2022-01-02 18:46:59 +08:00
thomashii
03ef2705bd Merge branch 'feature/update-orm' 2022-01-02 18:16:04 +08:00
thomashii
8666997832 Fixed null-safety error 2022-01-02 18:12:51 +08:00
Thomas Hii
af933c3845
Merge pull request #35 from dukefirehawk/feature/update-orm
Updated ORM
2022-01-02 18:10:51 +08:00
thomashii
c5286ea623 Removed Test Folder 2022-01-02 15:27:06 +08:00
thomashii
630b301555 Fixed ORM Generator 2022-01-02 15:21:17 +08:00
Thomas Hii
342bdb322e
Merge pull request #34 from dukefirehawk/feature/update-orm
Update ORM for Postgresql
2021-12-30 10:10:28 +08:00
thomashii
e470730990 Updated ORM Postresql 2021-12-30 10:07:04 +08:00
thomashii
77a364c446 Updated JAEL 2021-12-30 09:44:26 +08:00
thomashii
487d1e0bc7 Merge branch 'master' into feature/update-orm 2021-12-29 10:58:15 +08:00
thomashii
75fd2fce2a Removed debug message 2021-12-25 10:54:16 +08:00
Thomas Hii
97fb2edf87
Merge pull request #33 from dukefirehawk/feature/update-jael
Added JAEL template preload
2021-12-25 10:43:24 +08:00
thomashii
127b14bd99 Updated JAEL 2021-12-25 10:40:30 +08:00
thomashii
b8499023a2 Updated ORM 2021-12-23 20:05:57 +08:00
Thomas Hii
d8336d26b5
Merge pull request #32 from dukefirehawk/feature/update-jael
Optimised JAEL output
2021-12-23 07:37:39 +08:00
thomashii
ab6a4895d0 Optimised JAEL output 2021-12-23 07:34:41 +08:00
Thomas Hii
61410f8d9d
Merge pull request #31 from dukefirehawk/feature/remove-unused
Removed deprecated packages
2021-12-22 07:52:31 +08:00
thomashii
9b000c768e Removed deprecated packages 2021-12-22 07:51:13 +08:00
thomashii
70e6f1b6c1 Updated README 2021-12-21 09:11:53 +08:00
thomashii
2a6536c5c1 Updated orm_test pubspec 2021-12-21 08:14:41 +08:00
thomashii
2327564d14 Updated orm_service pubspec 2021-12-21 08:08:32 +08:00
thomashii
b481b6fdf6 Updated orm_mysql pubspec 2021-12-21 08:02:53 +08:00
thomashii
9a78563dd6 Updated orm_generator pubspec 2021-12-21 07:58:40 +08:00
thomashii
16ed4bf9a4 Updated README 2021-12-21 07:52:59 +08:00
Thomas Hii
72db767c49
Merge pull request #30 from dukefirehawk/feature/update-orm
Updated ORM linter & license
2021-12-21 07:37:11 +08:00
thomashii
2796c0a615 Updated linter 2021-12-20 12:25:43 +08:00
Thomas Hii
4bacd4d77e
Merge pull request #29 from dukefirehawk/feature/update-jael
Enabled Jael cache
2021-12-20 01:41:26 +08:00
thomashii
9dc5f60379 Updated jael 2021-12-20 01:39:16 +08:00
thomashii
6ffbdcf442 Updated jael_language_server 2021-12-20 00:28:51 +08:00
thomashii
1e7446af51 Update jael3_web 2021-12-20 00:22:12 +08:00
Thomas Hii
ca8e85e60c
Merge pull request #28 from dukefirehawk/feature/update-redis
Updated angel3_redis
2021-12-19 10:45:54 +08:00
thomashii
cf1eef865f Updated redis 2021-12-19 10:44:45 +08:00
Thomas Hii
8dfc804afb
Merge pull request #27 from dukefirehawk/feature/update-cache
Updated angel3_cache
2021-12-19 10:25:11 +08:00
thomashii
5b52133b55 Updated cache linter 2021-12-19 10:23:27 +08:00
thomashii
c679ba2071 Removed dev.pem and dev.key 2021-12-19 10:21:21 +08:00
Thomas Hii
437c863aa5
Merge pull request #26 from dukefirehawk/feature/update-production
Updated angel3_production repo link
2021-12-19 10:09:18 +08:00
thomashii
eee6631d73 Updated repo link 2021-12-19 10:07:55 +08:00
thomashii
7c3aa37786 Published angel3_orm and angel3_model 2021-12-10 14:03:15 +08:00
Thomas Hii
bc070ca798
Merge pull request #23 from dukefirehawk/bug-fix/pr-21
Removed error field
2021-12-10 13:19:44 +08:00
thomashii
e9ded9d6b4 Removed error field 2021-12-10 13:18:29 +08:00
Thomas Hii
33d113e455
Merge pull request #22 from debuggerx01/auto_update_timestamp
feat: createdAt + updatedAt should default to CURRENT_TIMESTAMP
2021-12-10 11:45:14 +08:00
debuggerx01
9e3e88abe6 feat: createdAt + updatedAt should default to CURRENT_TIMESTAMP 2021-12-09 14:50:23 +08:00
Thomas Hii
e8af46492c
Merge pull request #19 from prince-ao/master
Update README.md
2021-12-04 19:55:55 +08:00
Prince
6c8789ce34
Update README.md 2021-12-03 14:52:52 -05:00
Thomas Hii
5221cd244d
Merge pull request #18 from dukefirehawk/feature/publish-jinja
Publish Jinja
2021-12-03 13:32:00 +08:00
thomashii
75890c0efd Publish Jinja 2021-12-03 13:30:50 +08:00
Thomas Hii
3500065b96
Merge pull request #17 from debuggerx01/jinja-patch-debuggerx
Update angel3_jinja.dart
2021-12-03 13:14:13 +08:00
debuggerx01
f1772b3996
Update angel3_jinja.dart 2021-12-02 14:49:18 +08:00
Thomas Hii
d34c335090
Merge pull request #16 from dukefirehawk/feature/publish-framework
Published angel3_framework 4.2.3
2021-12-01 15:15:18 +08:00
thomashii
f0c629ceb8 Updated README 2021-12-01 15:10:58 +08:00
Thomas Hii
5e3abdad74
Merge pull request #15 from debuggerx01/fix_res_json
Fixed res.json() causing 'Bad state: Cannot modify a closed...'
2021-12-01 15:03:00 +08:00
debuggerx01
ad0e6ecf06 fix: res.json() will cause 'Bad state: Cannot modify a closed response.' error. 2021-11-30 18:32:48 +08:00
thomashii
1d8fb252be Updated framework 2021-11-29 09:04:50 +08:00
thomashii
8b2d9bf725 Updated framework 2021-11-28 12:15:56 +08:00
Thomas Hii
da207f2ddf
Merge pull request #14 from dukefirehawk/feature/jael_minified_output 2021-11-25 08:39:12 +08:00
thomashii
3db5497480 Updated jael 2021-11-25 08:33:56 +08:00
Thomas Hii
a8cb77a972
Merge pull request #13 from dukefirehawk/feature/update_res_header
Updated response header
2021-11-23 18:31:28 +08:00
thomashii
c870b4bab6 Updated response header 2021-11-23 18:27:01 +08:00
thomashii@dukefirehawk.com
9c2b307ab6 Updated changelog 2021-11-16 07:52:20 +08:00
thomashii@dukefirehawk.com
967018b353 Published angel3_hot update 2021-11-16 07:49:11 +08:00
Thomas Hii
1f4a29c5fa
Merge pull request #12 from CedricM-1848552/patch-1
Removed redundant '!' in angel3_hot.dart
2021-11-16 07:41:51 +08:00
CedricM-1848552
558260ec94
Update angel3_hot.dart
Removed excess '!' operation which caused the following error message,
```
Warning: Operand of null-aware operation '!' has type 'AngelWebSocket' which excludes null.
../…/lib/angel3_hot.dart:362
- 'AngelWebSocket' is from 'package:angel3_websocket/server.dart' ('../../../../../.pub-cache/hosted/pub.dartlang.org/angel3_websocket-4.1.2/lib/server.dart').
package:angel3_websocket/server.dart:1
          var ws = _server!.app.container!.make<AngelWebSocket>()!;
```
2021-11-15 19:59:20 +01:00
thomashii
d0fc25c4e1 Published auth, container, framework, webscoket 2021-10-04 14:00:17 +08:00
Thomas Hii
94713ddbd6
Merge pull request #11 from dukefirehawk/angel3
Fixed requireAuthentication
2021-10-04 13:17:05 +08:00
thomashii
3b9092d4df Fixed requireAuthentication 2021-10-04 13:13:56 +08:00
thomashii
3699be3452 Updated pubspec 2021-09-29 16:11:02 +08:00
thomashii
dcb7ff0e85 Updated client 2021-09-29 16:02:06 +08:00
Thomas Hii
37ec2f06aa
Merge pull request #9 from dukefirehawk/angel3
Changed AuthToken to have required userId field
2021-09-29 15:51:54 +08:00
thomashii
7cbbc686ba Updated auth 2021-09-29 15:40:27 +08:00
thomashii
7652c02183 Updated container generator 2021-09-27 21:55:04 +08:00
Thomas Hii
0d4c3e0f85
Merge pull request #8 from dukefirehawk/angel3
Updated route dependencies
2021-09-26 15:23:38 +08:00
thomashii
d7f41f1ab0 Updated Route 2021-09-26 15:21:38 +08:00
thomashii
26ddc9d39e Cleanup 2021-09-26 15:09:13 +08:00
thomashii
ca050070ae Updated pubspec for release 2021-09-26 15:05:52 +08:00
thomashii
a40f622f75 Updated pubspec for release 2021-09-26 15:04:43 +08:00
thomashii
879f205ee3 Updated pubspec for release 2021-09-26 15:03:29 +08:00
thomashii
93f07c8871 Updated README 2021-09-26 15:01:41 +08:00
Thomas Hii
4a632451dc
Merge pull request #7 from dukefirehawk/angel3
Updated auth, model, container and container generator
2021-09-26 14:58:11 +08:00
thomashii
e6b31ece2a Updated auth, model, container and its generator 2021-09-26 14:53:42 +08:00
thomashii
d877064e85 Updated pubspec 2021-09-26 00:27:33 +08:00
thomashii
478bbff83f Update pubspec 2021-09-26 00:24:27 +08:00
thomashii
70d247c017 Removed .idea files 2021-09-26 00:21:10 +08:00
thomashii
d641b21eac Updated README 2021-09-26 00:17:28 +08:00
Thomas Hii
8f0a8155d6
Merge pull request #6 from dukefirehawk/angel3
Angel3
2021-09-26 00:11:24 +08:00
thomashii
f3541e23bc Updated orm_postgresql 2021-09-25 23:53:55 +08:00
thomashii
b7aff78a41 Updated security 2021-09-25 23:37:22 +08:00
thomashii
37a8681bf8 Updated shelf 2021-09-25 23:04:25 +08:00
thomashii
612f010912 Updated license 2021-09-25 22:55:32 +08:00
thomashii
a7f3c87b00 Updated test 2021-09-25 22:51:11 +08:00
thomashii
28de345422 Added deprecated message 2021-09-25 15:18:01 +08:00
thomashii
0b0a99e780 Removed pedantic dependency 2021-09-25 15:09:47 +08:00
thomashii
dbd8bda565 Updated pubspec 2021-09-25 15:00:19 +08:00
thomashii
dcfd5b3ab0 Updated pubspec 2021-09-25 14:55:56 +08:00
Thomas Hii
7a5e3ae1ab
Merge pull request #5 from dukefirehawk/angel3
Updated linter to package:lints
2021-09-25 14:43:18 +08:00
thomashii
efca425bd0 Updated linter to package:lints 2021-09-25 14:32:32 +08:00
thomashii
9fdeb7149a Updated change log 2021-09-14 13:40:42 +08:00
thomashii
0bdfcfb183 Updated user_agent 2021-09-14 09:45:16 +08:00
thomashii
f7baedb06e Updated pubspec 2021-09-14 09:28:43 +08:00
thomashii
0399a90320 Updated pubspec 2021-09-14 09:24:10 +08:00
thomashii
f624f87f96 Updated angel3_shelf 2021-09-14 09:23:03 +08:00
thomashii
4c426b76d2 Updated README 2021-09-13 10:45:15 +08:00
thomashii
ae0b40079c Deprecated angel3_symbol_table 2021-09-13 08:55:07 +08:00
Thomas Hii
242a70b7c9
Update CHANGELOG.md 2021-09-13 08:49:02 +08:00
Thomas Hii
039fbf928b
Merge pull request #4 from dukefirehawk/angel3
Angel3
2021-09-13 08:45:13 +08:00
thomashii
4199da654b Fixed linter warnings 2021-09-13 08:35:38 +08:00
thomashii
9865ed93d2 Updated Jael to use belatuk_symbol_table 2021-09-13 08:30:02 +08:00
thomashii
c0457f0204 Fixed warnings 2021-09-12 22:12:18 +08:00
thomashii
21455a327c Deprecated range_header 2021-09-12 20:17:05 +08:00
thomashii
ad3bde2e70 Updated static 2021-09-12 13:22:01 +08:00
thomashii
49ccccabf2 Updated body_parser 2021-09-12 13:10:53 +08:00
thomashii
03a2a9385c Update pub_sub 2021-09-12 13:04:10 +08:00
thomashii
6371c69bfe Updated license 2021-09-12 12:54:37 +08:00
thomashii
e985327fe3 Updated license link 2021-09-12 12:33:41 +08:00
thomashii
d788b83ab7 Updated license 2021-09-12 12:08:37 +08:00
thomashii
fa42ce7294 Updated production 2021-09-12 11:00:15 +08:00
thomashii
b463568988 Updated sync 2021-09-12 10:52:19 +08:00
thomashii
96ea1b1611 Moved html_builder to belatuk repo 2021-09-12 10:41:14 +08:00
thomashii
3b42fcae46 Moved to belatuk repository 2021-09-12 10:34:20 +08:00
thomashii
507e1a3710 Cleanup 2021-09-11 18:54:02 +08:00
thomashii
715051e416 Updated README 2021-09-11 18:53:01 +08:00
thomashii
e88219da70 Updated serialize_generator 2021-09-11 14:37:53 +08:00
thomashii
d09d08caad Updated angel3_html 2021-09-11 12:03:14 +08:00
thomashii
d528e5d2a4 Deprecated html_builder 2021-09-11 11:49:37 +08:00
thomashii
d810e27673 Updated hot 2021-09-11 11:18:35 +08:00
thomashii
3d8778db5a Updated pkg:angel3_production to use lints 2021-09-11 08:41:00 +08:00
thomashii
c099750755 Updated README 2021-08-20 13:55:04 +08:00
thomashii
a22e0fd752 Updated README 2021-08-20 13:46:02 +08:00
thomashii
68e410b94b Updated README 2021-08-20 12:59:15 +08:00
thomashii
5bfc268884 Updated sync 2021-08-20 12:59:02 +08:00
thomashii
ee3c087ef5 Updated seo 2021-08-20 10:33:49 +08:00
thomashii
d440590c2c Updated orm generator 2021-08-17 15:35:51 +08:00
thomashii
c989df244c Updated orm generator 2021-08-17 15:33:42 +08:00
thomashii
d2c6750225 Updated serialize generator 2021-08-17 15:29:10 +08:00
thomashii
b8024e8120 Updated serialize generator 2021-08-17 12:52:08 +08:00
thomashii
6f15e76d65 Updated orm generator 2021-08-15 16:05:22 +08:00
thomashii
1f57b79c6d Updated serialize generator 2021-08-15 16:04:21 +08:00
thomashii
4f36170ead Updated serializer generator 2021-08-14 11:52:31 +08:00
thomashii
ab347f1b3e Updated orm service 2021-08-12 11:40:30 +08:00
thomashii
ae4e82f55b Updated orm service 2021-08-12 11:39:01 +08:00
thomashii
b65af20843 Updated to use analyzer 2.0.0 2021-08-12 11:13:33 +08:00
thomashii
4726b2d8c1 Update to analyzer 2.0.0 2021-08-12 11:10:35 +08:00
thomashii
c734d91dfd Updated orm generator 2021-08-11 09:37:37 +08:00
thomashii
1bd40f28b4 Updated serialize generator 2021-08-11 09:32:53 +08:00
thomashii
d5c625d9f9 Updated serialize generator 2021-08-08 11:10:35 +08:00
thomashii
2643436d62 Updated model 2021-08-08 10:45:56 +08:00
thomashii
de18c82e66 Updated serialize 2021-08-02 20:38:47 +08:00
thomashii
c24b0095da Updated model 2021-08-02 20:26:00 +08:00
thomashii
9184dce6ab Updated model 2021-08-02 20:20:07 +08:00
thomashii
8885a6b1c3 Updated orm generator 2021-08-01 18:55:01 +08:00
thomashii
3fde227c94 Updated orm test 2021-07-29 19:33:32 +08:00
thomashii
bdb7ce0163 Updated orm postgres 2021-07-29 19:29:07 +08:00
thomashii
3ba446fdce Updated orm 2021-07-29 19:23:37 +08:00
thomashii
08f47a2743 Updated orm mysql 2021-07-25 21:55:58 +08:00
thomashii
b670a08ae3 Updated orm postgres 2021-07-25 21:50:39 +08:00
thomashii
3eeefa7916 Updated orm test 2021-07-25 21:48:10 +08:00
thomashii
adcbdb3824 Updated orm postgres 2021-07-25 21:39:29 +08:00
thomashii
bf797c7dfe Updated migration runner 2021-07-25 21:36:40 +08:00
thomashii
0b2fc542f8 Updated orm generator 2021-07-25 21:33:33 +08:00
thomashii
c9f8d5d479 Updated migration 2021-07-25 21:24:13 +08:00
thomashii
5a6992bb16 Updated ORM 2021-07-25 21:16:50 +08:00
thomashii
7f74187e22 Updated orm generator 2021-07-25 18:57:49 +08:00
thomashii
cd2e0f8095 Updated serializer generator 2021-07-25 18:47:41 +08:00
thomashii
e81b44af8e Updated orm generator 2021-07-25 18:35:05 +08:00
thomashii
9c4df63b8f Updated migration runner 2021-07-25 18:27:26 +08:00
thomashii
8603d22d97 Updated ORM 2021-07-25 18:12:43 +08:00
thomashii
516d366043 Updated angel_orm_postgres 2021-07-19 13:09:28 +08:00
thomashii
68d2541f03 Updated paginate 2021-07-19 13:02:17 +08:00
thomashii
468513304c Updated angel_orm_generator 2021-07-19 13:00:00 +08:00
thomashii
91f405811b Updated angel_migration_runner 2021-07-19 12:55:50 +08:00
thomashii
28c4705898 Updated angel_migration_runner 2021-07-19 12:49:31 +08:00
thomashii
7d815a2aa0 Updated angel_migration 2021-07-19 12:32:45 +08:00
thomashii
cd5c120f8f Updated angel_orm 2021-07-19 12:27:40 +08:00
thomashii
0f15b1932a Updated hot 2021-07-18 15:21:25 +08:00
thomashii
a02e8025bd Updated hot reloader 2021-07-18 15:18:31 +08:00
thomashii
50bc5d2c51 Added comments 2021-07-18 14:02:25 +08:00
thomashii
82a8c9caed Updated production 2021-07-18 13:49:37 +08:00
thomashii
9da4eeeb46 Updated production 2021-07-18 13:36:33 +08:00
thomashii
f2eb12551c Updated websocket 2021-07-15 17:44:23 +08:00
thomashii
d3f65b12fa Updated range_header 2021-07-15 16:41:30 +08:00
thomashii
a6f24189e4 Updated websocket 2021-07-15 16:14:52 +08:00
thomashii
38cc17e381 Updated client 2021-07-15 16:11:54 +08:00
thomashii
6dbc1f5b9a Updated auth 2021-07-15 16:04:32 +08:00
thomashii
fdc909b536 Update auth 2021-07-15 15:57:47 +08:00
thomashii
62336e0d53 Updated websocket 2021-07-10 12:32:42 +08:00
thomashii
0d294adb20 Updated test 2021-07-10 10:51:07 +08:00
thomashii
335e1a9907 Updated body_parser 2021-07-10 10:18:20 +08:00
thomashii
b620bf853c Updated body_parser 2021-07-10 10:17:05 +08:00
thomashii
346389f1ef Updated static 2021-07-10 09:48:47 +08:00
thomashii
340d8a926d Updated auth_oauth2 2021-07-10 09:45:50 +08:00
thomashii
f70f090e7b Updated auth_oauth2 2021-07-10 09:29:41 +08:00
thomashii
88016ec045 Updated cors 2021-07-10 09:05:24 +08:00
thomashii
f3ca65976c Updated client 2021-07-10 08:49:07 +08:00
thomashii
3b37f604a7 Updated client 2021-07-10 08:47:25 +08:00
thomashii
b5de3450c7 Updated change log 2021-07-09 22:19:33 +08:00
thomashii
c16b369de8 Fixed client 2021-07-09 22:19:16 +08:00
thomashii
d9d6ef1fcb Updated cache 2021-07-09 13:46:15 +08:00
thomashii
29ec277dee Updated cache 2021-07-09 13:44:26 +08:00
thomashii
01040973b7 Updated validate 2021-07-09 13:39:39 +08:00
thomashii
6272987ccd Updated Change Log 2021-07-08 13:25:34 +08:00
thomashii
5a014bf1d0 Updated configuration 2021-07-08 13:23:02 +08:00
thomashii
c4f26ad4ca Updated logging 2021-07-08 12:49:34 +08:00
thomashii
fdfd859ff2 Updated to do 2021-07-08 10:53:05 +08:00
thomashii
7ead38f5c8 Updated vscode settings 2021-07-08 10:44:27 +08:00
thomashii
437849bbd1 Updated framework 2021-07-08 10:42:40 +08:00
thomashii
0d1601980a Updated auth 2021-07-08 09:20:21 +08:00
thomashii
aa3ce41a9a Removed unused IDE files 2021-07-06 07:31:27 +08:00
thomashii
de3f8683e2 Updated change log 2021-07-04 14:44:30 +08:00
thomashii
e5201fb6e9 Updated README 2021-07-04 14:03:33 +08:00
thomashii
2146b390fb Updated static 2021-07-04 13:59:50 +08:00
thomashii
cadbc1c4f7 Updated static 2021-07-04 11:22:19 +08:00
thomashii
89d710fe28 Updated framework unit tests 2021-06-27 00:18:46 +08:00
thomashii
eb52952eaa Updated test 2021-06-26 23:15:48 +08:00
thomashii
d5dba913af Removed redundant code 2021-06-26 21:13:43 +08:00
thomashii
7287bf12c1 Updated file_service 2021-06-26 20:06:30 +08:00
thomashii
16be2e8f94 Publish pagination 2021-06-26 19:55:17 +08:00
thomashii
5dbc9b5044 Updated security 2021-06-26 19:41:35 +08:00
thomashii
92d3000033 Moved vscode to own repo 2021-06-26 19:27:15 +08:00
thomashii
fa25803e50 Published security 2021-06-26 19:02:51 +08:00
thomashii
87d6a6bb58 Updated pubspec 2021-06-26 18:35:56 +08:00
thomashii
4cd63aa41a Published Jinja 2021-06-26 18:34:23 +08:00
thomashii
44f519e9d1 Published mustache 2021-06-26 18:24:52 +08:00
thomashii
c9c431b3e5 Updated cache 2021-06-26 18:02:41 +08:00
thomashii
0a456954b4 Updated mock_request 2021-06-24 19:59:11 +08:00
thomashii
32db2c2b46 Updated mock_request test cases 2021-06-23 21:06:57 +08:00
thomashii
92b3f0b74f Updated cache 2021-06-22 18:42:26 +08:00
thomashii
1dbe9e0bf7 Updated sembast 2021-06-22 17:44:16 +08:00
thomashii
75138eb416 Updated HTML_Builder 2021-06-22 17:35:08 +08:00
thomashii
546abbc49f Updated body_parser 2021-06-22 16:22:18 +08:00
thomashii
96fb385631 Updated framework 2021-06-22 16:17:15 +08:00
thomashii
c68e1c2216 Migrated markdown 2021-06-21 23:04:36 +08:00
thomashii
3906c64fc6 Published markdown 2021-06-21 14:33:18 +08:00
thomashii
0cccae9cd4 Published sembast 2021-06-21 14:16:06 +08:00
thomashii
ec2190162d Updated user_agent 2021-06-21 13:43:02 +08:00
thomashii
685c7fc6a5 Updated user_agent 2021-06-21 12:46:57 +08:00
thomashii
d95cf1ef63 Published user_agent 2021-06-21 12:43:13 +08:00
thomashii
51b7e553ea Updated README 2021-06-21 12:07:48 +08:00
thomashii
f5cd469981 Updated redis README 2021-06-21 11:41:37 +08:00
thomashii
4617eab0e7 Updated redis 2021-06-21 11:39:00 +08:00
thomashii
92df34f375 Published angel3_redis 2021-06-21 09:58:05 +08:00
thomashii
1a63e8f6bd Updated body_parser 2021-06-21 09:27:19 +08:00
thomashii
3dda3cf844 Published body_parser 2021-06-20 21:29:23 +08:00
thomashii
62f2235a6d Merged from sdk-2.12.x_nnbd 2021-06-20 20:37:20 +08:00
thomashii
3adf9d62bc Published mongo 2021-06-18 19:10:38 +08:00
thomashii
bba3948a2b Published orm_service 2021-06-18 18:29:49 +08:00
thomashii
4141c60c50 Update orm_mysql 2021-06-18 18:17:13 +08:00
thomashii
286ad100f0 Published angel_orm_mysql 2021-06-18 18:15:23 +08:00
thomashii
0b507461a7 Updated hot 2021-06-14 12:07:28 +08:00
thomashii
2deddf2761 Updated license 2021-06-14 11:52:58 +08:00
thomashii
1b28887608 Moved CLI and graphQL 2021-06-13 18:11:45 +08:00
thomashii
19e060800e Updated file_service description 2021-06-11 08:18:24 +08:00
thomashii
70c4882727 Published proxy and file_service 2021-06-10 16:47:05 +08:00
thomashii
e25b67d41f Updated README 2021-06-07 09:04:35 +08:00
thomashii
740b78ba00 Updated auth 2021-06-07 08:50:39 +08:00
thomashii
7f9e3c58cc Updated auth pubspec 2021-06-01 09:04:15 +08:00
thomashii
2a0f32c89e Publish framework and auth updates 2021-06-01 09:01:01 +08:00
thomashii
05a45bee4f Fixed "failureRedirect" test case 2021-06-01 08:49:59 +08:00
thomashii
a30201ebb1 Fixed auth returning 500 instead of 403 2021-05-31 09:05:34 +08:00
thomashii
3f42d1ff5f Updated auth 2021-05-30 09:00:16 +08:00
thomashii
72029bd6e7 Updated oauth2 2021-05-30 08:58:03 +08:00
thomashii
c8cc239e1a Updated CHANGELOG 2021-05-30 08:52:37 +08:00
thomashii
db49c82fc0 Published oauth2, cache, cors, auth_oauth2 2021-05-30 08:46:13 +08:00
thomashii@dukefirehawk.com
e79826bad0 Updated auth 2021-05-29 09:48:33 +08:00
thomashii@dukefirehawk.com
ef0e625707 Updated pubspec for publishing 2021-05-29 09:15:29 +08:00
thomashii@dukefirehawk.com
9c2f1dd0cb Fixed framework test cases 2021-05-29 09:14:16 +08:00
thomashii@dukefirehawk.com
16fc8c3436 Fixed framework test cases 2021-05-29 07:44:06 +08:00
thomashii
6890155712 Update orm_postgres 2021-05-19 23:35:55 +08:00
thomashii
4b3ba0ba2b Updated orm_test 2021-05-18 23:20:25 +08:00
thomashii
3af80f80b2 Updated orm_test 2021-05-18 23:07:36 +08:00
thomashii
e5036e734f Updated migration_runner 2021-05-18 22:47:56 +08:00
thomashii
88bdabc5c9 Published migration_runner 2021-05-18 22:36:40 +08:00
thomashii
d2eb602b2d Updated pub_sub 2021-05-18 21:55:30 +08:00
thomashii
94d3adb3f1 Update code_buffer 2021-05-18 21:47:54 +08:00
thomashii
03857aba7c Updated symbol_table 2021-05-18 21:42:21 +08:00
thomashii
d2006816cb Updated container 2021-05-18 21:33:20 +08:00
thomashii
9dfc847840 Updated merge_map 2021-05-18 21:27:19 +08:00
thomashii
26d9936a3f Updated combinator 2021-05-18 21:15:28 +08:00
thomashii
082b7876b4 Updated symbol_table 2021-05-18 20:32:54 +08:00
thomashii
38e38c4a84 Updated jael_preprocessor 2021-05-18 20:12:47 +08:00
thomashii
bb6fa4bec1 Updated range_header 2021-05-18 19:58:51 +08:00
thomashii
27d739864c Updated test 2021-05-18 19:43:58 +08:00
thomashii
b7e0d01844 Updated serialize_generator 2021-05-18 19:32:47 +08:00
thomashii
63bc91c203 Update orm_generator 2021-05-18 17:47:41 +08:00
thomashii
80ec2e10a8 Update production 2021-05-18 17:42:21 +08:00
thomashii
718064ad66 Updated angel_orm_generator 2021-05-18 08:27:49 +08:00
thomashii
93ae90f68b Updated angel_migration 2021-05-18 08:22:46 +08:00
thomashii
e050003554 Updated angel_migration 2021-05-18 08:20:08 +08:00
thomashii
3146e42531 Updated pubspec 2021-05-18 00:04:47 +08:00
thomashii
e88faa03ae Updated orm_generator 2021-05-18 00:03:26 +08:00
thomashii
ebdb634a95 Publish migration 2021-05-17 23:34:19 +08:00
thomashii
eb9f79ab85 Fixed static analysis warnings 2021-05-17 23:10:07 +08:00
thomashii
8e4be01565 Moved inflection2 to inflection3 2021-05-17 22:50:37 +08:00
thomashii
ea03a12a24 Fixed orm warning 2021-05-17 22:16:15 +08:00
thomashii
4be81470f9 Updated orm 2021-05-17 13:55:09 +08:00
thomashii
b4b8031faf Publish orm 2021-05-16 23:11:12 +08:00
thomashii
361ca79ae4 Updated README 2021-05-16 18:53:36 +08:00
thomashii
ed801da440 Updated installation section 2021-05-16 18:46:58 +08:00
thomashii
c9c5699cdd Update README 2021-05-16 17:54:16 +08:00
thomashii
37f4f6b329 Updated logo 2021-05-16 17:41:31 +08:00
thomashii
57b45decd1 Merge branch 'angel3' into master 2021-05-16 16:20:23 +08:00
thomashii
4afe73ca98 Updated README 2021-05-16 16:07:47 +08:00
thomashii
3df9010af0 Updated framework 2021-05-16 01:58:51 +08:00
thomashii
515c813900 Updated html_builder 2021-05-15 22:48:20 +08:00
thomashii
9bf1fbdafb Publish serialize_generator 2021-05-15 22:37:52 +08:00
thomashii
203f99f2f6 Publish serialize 2021-05-15 22:20:56 +08:00
thomashii
61bae79233 Publish html_builder 2.0.1 2021-05-15 22:12:07 +08:00
thomashii
37c586a7e5 Update authors and licence 2021-05-15 21:37:00 +08:00
thomashii
17ceb3d91d Update Changelog 2021-05-15 21:28:50 +08:00
thomashii
5dd45c73dc Publish static 2021-05-15 21:28:26 +08:00
thomashii
43640a56f1 Publish hot 2021-05-15 21:17:18 +08:00
thomashii
3f55c1df67 Publish range_header 2021-05-15 19:58:09 +08:00
thomashii
4603bfcc69 Publish html_builder 2021-05-15 19:47:48 +08:00
thomashii
7a4d31ad7d Publish production 2021-05-15 19:36:29 +08:00
thomashii
0f4e4df04e Update README 2021-05-15 19:21:34 +08:00
thomashii
0b2dd96a75 Publish pub_sub 2021-05-15 19:20:33 +08:00
thomashii
048acafa31 publish angel_jael 2021-05-15 18:45:39 +08:00
thomashii
091d7c93a3 Publish jael_preprocessor 2021-05-15 18:28:09 +08:00
thomashii
b643cfc274 Publish jael 2021-05-15 18:16:37 +08:00
thomashii
eabc1ba828 Restore jael to original name 2021-05-15 17:55:55 +08:00
thomashii
19f7a273d9 Rename jael to jael3 2021-05-15 17:49:41 +08:00
thomashii
f88936f03c Migrated jael to jael2 2021-05-15 17:38:15 +08:00
thomashii
e6a7496d66 Publish symbol_table 2021-05-15 17:03:00 +08:00
thomashii
8a30a91a27 Updated authors and license 2021-05-15 16:48:20 +08:00
thomashii
3ac245db46 Publish test 2021-05-15 16:35:27 +08:00
thomashii
cf208bf673 Updated json_god 2021-05-15 15:28:00 +08:00
thomashii
6092d028b5 Update websocket 2021-05-15 15:23:13 +08:00
thomashii
e5acc33350 Publish websocket 2021-05-15 15:19:35 +08:00
thomashii
b1d580fdd2 Publish client 2021-05-15 14:53:03 +08:00
thomashii
b68af3789a Publish json_god 2021-05-15 14:46:26 +08:00
thomashii
9dd44d21fc Publish validate 2021-05-15 14:35:45 +08:00
thomashii
50088f4160 Publish auth 2021-05-15 14:32:25 +08:00
thomashii
143e4841f8 Publish configuration 2021-05-15 14:27:09 +08:00
thomashii
6939441543 Publish framework 2021-05-15 14:18:06 +08:00
thomashii
42060f7b90 Publish mock_request 2021-05-15 14:14:04 +08:00
thomashii
440e8bd899 Publish merge_map 2021-05-15 14:12:55 +08:00
thomashii
8a04fc0344 Publish container 2021-05-15 14:07:19 +08:00
thomashii
62224b73da Publish model 2021-05-15 14:04:36 +08:00
thomashii
9d6b630c42 Publish route 2021-05-15 14:01:47 +08:00
thomashii
6bd1f07308 Updated CHANGELOG 2021-05-15 13:52:58 +08:00
thomashii
b3a32dfeb6 Updated combinator 2021-05-15 13:51:23 +08:00
thomashii
3467f63fa6 Publish code_buffer 2021-05-15 13:48:05 +08:00
thomashii
5837a32840 Publish pretty_logging 2021-05-15 13:44:31 +08:00
thomashii
d4b8dc64cd Updated README 2021-05-15 11:52:28 +08:00
thomashii
3a5040d26c Updated CHANGELOG 2021-05-15 11:48:59 +08:00
thomashii
ab5b32dcc4 Update LICENSE link 2021-05-15 11:47:27 +08:00
thomashii
537a45e3d2 Publish http_exception 3.0.1 2021-05-15 10:54:41 +08:00
thomashii
cdec62a914 Updated json_god 2021-05-15 09:31:17 +08:00
thomashii
cfd34cbce0 Publish angle3_json_god 2021-05-14 20:24:45 +08:00
thomashii
0a15214e53 Publish angel3_validate 2021-05-14 19:47:44 +08:00
thomashii
d6dac4b35b Update configuration 2021-05-14 19:33:08 +08:00
thomashii
8473e93774 Update pubspec.yml 2021-05-14 19:29:07 +08:00
thomashii
7153eba111 Publish angel3_configuration 2021-05-14 19:27:54 +08:00
thomashii
c4b39d94ae Updated auth pubspec.yml 2021-05-14 19:12:18 +08:00
thomashii
36874a97ec Publish angel3_auth 2021-05-14 19:09:48 +08:00
thomashii
f0077caaa5 Fixed code_buffer issue 2021-05-14 18:55:10 +08:00
thomashii
419b9de7f3 Fixed pretty_logging 2021-05-14 18:45:55 +08:00
thomashii
f713c1f001 Publish angel3_framework 2021-05-14 18:34:09 +08:00
thomashii@dukefirehawk.com
4d021e9f95 Updated changelog 2021-05-14 16:08:17 +08:00
thomashii@dukefirehawk.com
19858b3f6e Publish angel3_merge_map and angel3_mock_request 2021-05-14 16:06:16 +08:00
thomashii@dukefirehawk.com
5db88c8a92 Publish angel3_container 2021-05-14 15:41:25 +08:00
thomashii@dukefirehawk.com
82c6c9866e Publish angel3_model 2021-05-14 15:23:53 +08:00
thomashii@dukefirehawk.com
7c37497860 Publish angel3_route 2021-05-14 15:02:50 +08:00
thomashii@dukefirehawk.com
b0682383da Updated pubspec 2021-05-14 14:17:10 +08:00
thomashii@dukefirehawk.com
dd752ad11b Updated dependencies 2021-05-14 14:15:58 +08:00
thomashii@dukefirehawk.com
33f51d837b Publish angel3_combinator 2021-05-14 14:11:50 +08:00
thomashii@dukefirehawk.com
b56724aab5 Published angel3_http_exception 2021-05-14 11:57:54 +08:00
thomashii@dukefirehawk.com
b6dbeb2ce7 Published angel3_pretty_logging 2021-05-14 11:49:34 +08:00
thomashii@dukefirehawk.com
01bab10c02 Fixed AUTHORS.md 2021-05-14 11:20:01 +08:00
thomashii@dukefirehawk.com
5a4dd0fb2b Publish angel3_code_buffer 2021-05-14 11:06:32 +08:00
thomashii@dukefirehawk.com
d561b97fd5 Fixed test cases 2021-05-12 07:42:50 +08:00
thomashii@dukefirehawk.com
b3196f9d9c Fixed test cases 2021-05-11 21:16:37 +08:00
thomashii@dukefirehawk.com
95e13b15c1 Fixed test cases 2021-05-11 20:48:22 +08:00
thomashii@dukefirehawk.com
7d5e75e440 Fixed route test cases 2021-05-11 20:11:23 +08:00
thomashii@dukefirehawk.com
25af334f4d Use Optional 2021-05-11 17:03:52 +08:00
thomashii@dukefirehawk.com
15926ff45d Fixed null safety issues 2021-05-09 19:16:15 +08:00
thomashii@dukefirehawk.com
5b3c589c8e Updated route 2021-05-07 13:21:13 +08:00
thomashii@dukefirehawk.com
f749264fbe Updated combinator 2021-05-07 13:10:24 +08:00
thomashii@dukefirehawk.com
c2c9e40836 Updated combinator 2021-05-07 12:42:02 +08:00
thomashii@dukefirehawk.com
7adeff9a63 Updated test cases 2021-05-06 13:30:08 +08:00
thomashii@dukefirehawk.com
05bea04db7 Updated test cases 2021-05-06 13:00:00 +08:00
thomashii@dukefirehawk.com
bdefa92f91 Update test cases 2021-05-06 12:22:29 +08:00
thomashii@dukefirehawk.com
6c8decd77c Update test cases 2021-05-06 12:04:22 +08:00
thomashii@dukefirehawk.com
35ea05bdef Updated test cases 2021-05-06 11:46:11 +08:00
thomashii@dukefirehawk.com
64bddb1ff7 Updated test cases 2021-05-06 09:19:23 +08:00
thomashii@dukefirehawk.com
291c852f65 Update test case 2021-05-05 23:38:05 +08:00
thomashii@dukefirehawk.com
370df62fb6 Update test cases 2021-05-05 23:29:41 +08:00
thomashii@dukefirehawk.com
0addba99d3 Update test case 2021-05-05 23:05:13 +08:00
thomashii@dukefirehawk.com
6e8f6aea9e Updated test cases 2021-05-05 14:26:23 +08:00
thomashii@dukefirehawk.com
50f8ba23da Update test cases 2021-05-05 13:01:25 +08:00
thomashii@dukefirehawk.com
005e819fa9 Update test cases 2021-05-05 09:37:59 +08:00
thomashii@dukefirehawk.com
41569aa53f Update test cases 2021-05-05 09:28:47 +08:00
thomashii@dukefirehawk.com
975c42000d Updated test cases 2021-05-05 09:22:16 +08:00
thomashii@dukefirehawk.com
bd6fe44cc0 Update test cases 2021-05-05 09:13:49 +08:00
thomashii@dukefirehawk.com
6dba84d69a Updated to use Optional 2021-05-04 23:16:44 +08:00
thomashii@dukefirehawk.com
b952d10d4b Updated deserialize 2021-05-04 23:03:15 +08:00
thomashii@dukefirehawk.com
922eaa102b Fixed test cases 2021-05-04 22:14:27 +08:00
thomashii@dukefirehawk.com
5feecc2275 Updated test 2021-05-04 21:31:36 +08:00
thomashii@dukefirehawk.com
1c4ff192a5 Migrated angel_orm 2021-05-04 16:53:32 +08:00
thomashii@dukefirehawk.com
8d3c8b9121 Replace null with Optional 2021-05-04 16:15:19 +08:00
thomashii@dukefirehawk.com
0204977281 Fixed ORM Query 2021-05-04 12:18:39 +08:00
thomashii@dukefirehawk.com
e11f8f77e1 Updated ORM 2021-05-04 12:03:08 +08:00
thomashii@dukefirehawk.com
a4ff96a831 Updated pubspec.yaml 2021-05-03 22:05:25 +08:00
thomashii@dukefirehawk.com
2d6fdfbe8a Updates model 2021-05-03 21:49:19 +08:00
thomashii@dukefirehawk.com
f27fe7381b Added Optional 2021-05-03 21:47:12 +08:00
thomashii@dukefirehawk.com
d241d7ca77 Added Optional package 2021-05-03 21:27:12 +08:00
thomashii@dukefirehawk.com
7644d8c2d2 Fixed Null Safety error 2021-05-03 14:50:20 +08:00
thomashii@dukefirehawk.com
522f5215e0 Testing angel_orm 2021-05-03 14:45:41 +08:00
thomashii@dukefirehawk.com
81b2e2e6b2 Changed return type to be nullable 2021-05-03 07:49:26 +08:00
thomashii@dukefirehawk.com
106528a93b Migrated angel_migration_runner 2021-05-02 23:34:47 +08:00
thomashii@dukefirehawk.com
ad4558cd0f Migrated angel_migration_runner 2021-05-02 19:44:38 +08:00
thomashii@dukefirehawk.com
af36c3b339 Migrated angel_orm_generator 2021-05-02 19:33:32 +08:00
thomashii@dukefirehawk.com
d2af68779e Updated README 2021-05-02 17:06:57 +08:00
thomashii@dukefirehawk.com
aa68d7f011 Fixed sdk error 2021-05-02 16:58:55 +08:00
thomashii@dukefirehawk.com
32f3eaa5c4 Added and migrated inflection2 2021-05-02 16:39:25 +08:00
thomashii@dukefirehawk.com
2deaf5d299 Migrated angel_migration 2021-05-02 15:36:33 +08:00
thomashii@dukefirehawk.com
69b7483794 Migrated angel_orm 2021-05-02 15:32:24 +08:00
thomashii@dukefirehawk.com
ed87d48c96 Migrated angel_serialize_generator 2021-05-02 14:02:08 +08:00
thomashii@dukefirehawk.com
1d3d10fb4f Migrated angel_serialize 2021-05-02 13:23:44 +08:00
thomashii@dukefirehawk.com
31e52b6ad3 Added AUTHORS.md 2021-05-02 12:12:43 +08:00
thomashii@dukefirehawk.com
19e37b330e Updated README 2021-05-01 12:53:29 +08:00
thomashii@dukefirehawk.com
75ee10d9f0 Updated README 2021-05-01 12:45:40 +08:00
thomashii@dukefirehawk.com
a1e65f830f Updated README 2021-05-01 12:42:19 +08:00
thomashii@dukefirehawk.com
7e5feb4500 Migration status update 2021-05-01 12:23:02 +08:00
thomashii@dukefirehawk.com
1bc68956de Updated change log 2021-05-01 12:16:04 +08:00
thomashii@dukefirehawk.com
3f30f8a56e Migrated static 2021-05-01 11:53:04 +08:00
thomashii@dukefirehawk.com
3b2fc97da1 Migrated range_header 2021-05-01 11:39:09 +08:00
thomashii@dukefirehawk.com
1e92db46a6 Migrated hot 2021-05-01 10:57:26 +08:00
thomashii@dukefirehawk.com
2a69ecf91b Added and migrated html_builder 2021-05-01 10:48:36 +08:00
thomashii@dukefirehawk.com
b091b435e4 Migrated production 2021-05-01 10:03:46 +08:00
thomashii@dukefirehawk.com
5994b1f405 Migrated pub_sub 2021-05-01 09:54:59 +08:00
thomashii@dukefirehawk.com
d80798d535 Updated README 2021-05-01 09:34:16 +08:00
thomashii@dukefirehawk.com
926ab3fabc Merge branch 'sdk-2.12.x' 2021-05-01 08:49:32 +08:00
thomashii@dukefirehawk.com
9553e41a2b Migrated angel_jael 2021-04-30 15:19:26 +08:00
thomashii@dukefirehawk.com
750dd63309 Fixed jael_preprocessor tests 2021-04-30 15:08:54 +08:00
thomashii@dukefirehawk.com
e83d56c9af Fixed jael 2021-04-30 07:32:16 +08:00
thomashii@dukefirehawk.com
ea6d566607 Migrated Jael 2021-04-29 15:21:31 +08:00
thomashii@dukefirehawk.com
436f797982 Migrated Jael 2021-04-28 08:37:33 +08:00
thomashii@dukefirehawk.com
ce510e0394 Updated pubspec dependencies 2021-04-28 08:00:30 +08:00
thomashii@dukefirehawk.com
e546ee2bd7 Migrated symbol_table 2021-04-28 07:58:38 +08:00
thomashii@dukefirehawk.com
99c0bd9ada Migrated test 2021-04-26 09:05:34 +08:00
thomashii@dukefirehawk.com
7bd8e5a57b Removed dependency_overrides 2021-04-26 08:50:51 +08:00
thomashii@dukefirehawk.com
41188b3df8 Migrated websocket 2021-04-26 08:47:32 +08:00
thomashii
ee2ac157eb Migrated websocket dependencies 2021-04-25 12:50:01 +08:00
thomashii
64d6cb8951 Updated angel_framework 2021-04-13 23:37:39 +08:00
thomashii
7186fa7990 Migrated angel_websocket 2021-04-10 23:12:43 +08:00
thomashii
037e82d699 Migrated angel_client to 4.0.0 2021-04-10 21:22:20 +08:00
thomashii
5e9172aca9 Migrated json_god 2021-04-10 20:42:55 +08:00
thomashii
d211fc2c3d Migrated angel_configuration 2021-04-10 19:23:57 +08:00
thomashii
526c761846 Changed statusCode and message to be not nullable 2021-04-09 21:38:31 +08:00
thomashii
d65a0e7c83 Framework migration update 2021-04-04 22:26:58 +08:00
thomashii
22e073eb3f Fixed route crashing 2021-04-03 23:04:25 +08:00
thomashii
ddbf7f33b6 Fixed migration bugs 2021-04-03 13:50:52 +08:00
thomashii
01171d8954 Updated to Null Safety 2021-03-31 14:33:31 +08:00
thomashii
cb56b31d10 Fixed null safety 2021-03-21 09:40:22 +08:00
thomashii
a7c2a0d3dc Fixed null safety 2021-03-21 09:37:54 +08:00
thomashii
f280c8b9bd Fixed null safety 2021-03-21 09:35:56 +08:00
thomashii
64d11cc86d Added default param 2021-03-21 09:18:46 +08:00
thomashii
7f257d173f Fixed null safety 2021-03-21 09:01:38 +08:00
thomashii
de6521158e Fixed null safety 2021-03-21 08:56:26 +08:00
thomashii
0bf4134792 Fixed null safety 2021-03-21 08:52:58 +08:00
thomashii
9c2f0cfa28 Fixed null safety 2021-03-21 08:44:06 +08:00
thomashii
3dadedaf20 Fixed type error 2021-03-21 08:19:16 +08:00
thomashii
1ccc78e3a2 Fixed tests 2021-03-21 08:02:50 +08:00
thomashii
5302f635ac Migrated angel_auth to NNBD 2021-03-21 07:51:20 +08:00
thomashii
fdf1532074 Updated angel framework to NNBD 2021-03-20 16:11:18 +08:00
thomashii
0fe0a5a56b Updated angel_framework to null safety 2021-03-20 10:42:43 +08:00
thomashii
554fbebe03 Added mock_request and updated to 2.0.0 2021-03-20 10:33:34 +08:00
thomashii
27ff8d9352 Fixed merge_map package version 2021-03-19 07:15:04 +08:00
thomashii
f8ec10d4e2 Added merge_map and mock_request packages 2021-03-19 07:10:19 +08:00
thomashii
aefe1f1ab8 Updated Angel Container to Null Safety 2021-03-18 08:21:42 +08:00
thomashii
5a1782efba Updated Angel Model to Null Safety 2021-03-18 08:15:01 +08:00
thomashii
5d722a6041 Updated Angel Route to Null Safety 2021-03-18 08:11:45 +08:00
thomashii
d62a4aa7ac Updated to Nullsafety 2021-03-18 08:00:56 +08:00
thomashii
55beadd737 Added combinator 2021-03-18 07:04:36 +08:00
thomashii
5b6f6bdf97 Added package code_buffer 2021-03-16 08:14:28 +08:00
thomashii
4cf7409c1d Merge branch 'master' into sdk-2.12.x_nnbd 2021-03-14 13:44:58 +08:00
thomashii
942ffed1ae Updated README.md 2021-03-13 11:00:04 +08:00
thomashii
2217804391 Updated README.md 2021-03-13 10:50:14 +08:00
thomashii
39fe2fd89e Updated README.md 2021-03-13 10:35:21 +08:00
thomashii
7ff5021491 Updated README.md 2021-03-13 10:32:48 +08:00
thomashii
71b55f9548 Merge branch 'sdk-2.12.x' into master 2021-03-13 10:13:56 +08:00
thomashii
ffa68e94ea Updated README.md 2021-03-13 10:12:24 +08:00
thomashii
0670c12c69 Updated README.md 2021-03-13 10:00:29 +08:00
thomashii
5920212d04 Migrated angel_http_exception to nnbd 2021-03-10 00:41:42 +08:00
thomashii
1db6b35fb3 Migrated pretty_logging to nndb 2021-03-10 00:40:38 +08:00
1707 changed files with 51315 additions and 59661 deletions

224
.cursorrules Normal file
View file

@ -0,0 +1,224 @@
The name of our company is Protevus
The name of our project is Platform
Protevus = Laravel and Platform = Illuminate
Our Development Langauge is Dart
Our cross-platform UI Kit is Flutter
Our Implementation is based on Angel3
Our Inspiration is based on Laravel
Our Deployment Target are Windows, MacOS, Linux, iOS, Android, Web, IoT and Edge Devices
Protevus Aims to bring a complete Laravel experience to Dart, and Flutter with a truely Unified Full Stack Experience. We aim to mature the platform to support cross-platform development of complex government, military, financial, medical, supply-chain, enterprise and idustrial applications.
Our 10 Step Development Lifecycle is as follows: We use a hybrid mix of Interface Driven Development, Test Driven Development and AI Software Engineer Agents to assist in generating efficient and reliable code while also providing help with other task like code reviews, documentation, and testing. We call this approach IDD-AI or Individual Driven Developemt AI.
1. Research - Research the requirements and specifications of the project.
2. Identify - Identify the key components and technologies that are needed to build the project. (use opensource)
3. Transform - Transform the requirements and specifications from the code to a langauge agnostic abstract contract (YAML)
4. Inform - Use the abstract contracts to inform the design of the system and the components.
5. Generate - Use AI to generate the initial code based on the abstract contracts.
6. Implement - Implement the code in the codebase.
7. Test - Test the code to ensure it meets the requirements and specifications.
8. Iterate - Iterate the code to improve the design and implementation.
9. Review - Review the code to ensure it meets the requirements and specifications.
10. Release - Release the code to the public.
Or RITIGITIRR pronounced Rih-tih-gih-tirr
The we wash rinse and repeat for each project. When we are done we have a fully functional and robust implementation of the requirements and specifications we will still follow this pattern for enhancements, bug fixes, and new features.
The API Specifications are in inbox/spec_packagename
The Concrete Implementations are in inbox/src_packagename
The directory structure for the project is as follows:
config/ = configuration files
devops/ = docker and kubernetes configuration
docs/ = documentation
examples/ = example applications demonstrating using the Platform API
packages/ = platform packages
resources = images, icons, and other resources
scripts/ = utility scripts
templates/ = starter templates
tests/ = repository wide integration tests
tools/ = project wide tools
utils/ = cli, console, and other utilities
Protevus Platform is a hard-fork of Angel3 that is being refactored and rebranded to be Protevus Platform
For now all references to Angel3 remain the same, but in the future we will be changing them to Protevus or Platform
You must always refer to the project as Platform, not Protevus or Angel3
You must always prefer leveraging existing sanctioned angel3 packages as dependencies where possible as most of them will be replace and can't be relied on initially.
You must always prefer leveraging existing standard dart packages as dependencies where possible
You will always prefer leveraging any packages that we can from pub.dev or github.com dart/flutter ecosystem
Our goal is to reimplement the laravel illuminate packages as angel3 packages in short bringing Laravel to Dart
Our goal is to reach feature parity with the illuminate api so we must adhere to the specifications of laravel's api as we reimplement the illuminate packages
We will not reimplement any packages that are not part of laravel, such as symfony packages, or any other packages that are not part of the laravel framework as our goal is to have pure dart implementations so we must find packages in the dart ecosystem where possible or create the feature in dart.
We will not be re-implementing some features of laravel that would require reinventing wheels, for example angel3's server system is more then sufficiant and consist of the following angel3 packages which we will be initally keeping. Container, Framework, Route Http_Exception, Mock_Request, Modal. All other Illuminate packages will be reimplemented in dart. This list of keepers may change as we begin our phases of development.
You must always take the following points into consderation when planning and executing your task.
1. Dart and Flutter ecosystem awareness:
- Stay updated with the latest Dart language features and best practices.
- Consider Flutter compatibility for components that might be used in mobile/web applications.
- Utilize popular Dart packages when appropriate, but be mindful of adding unnecessary dependencies.
2. Performance considerations:
- Implement benchmarking tools to compare performance with both Laravel and the original Angel3.
- Use Dart's profiling tools to identify and optimize bottlenecks.
- Consider implementing lazy loading and deferred initialization where appropriate.
3. Asynchronous programming:
- Leverage Dart's async/await and Future-based programming extensively.
- Implement proper error handling and cancellation for asynchronous operations.
- Consider using Streams for reactive programming where appropriate.
4. Code style and structure:
- Follow Dart's official style guide and linting rules.
- Implement consistent error handling and logging practices across all packages.
- Use Dart's strong typing system to its full potential, including generics and type inference.
5. Testing strategy:
- Implement both unit and integration tests for all components.
- Use mock objects and dependency injection to facilitate easier testing.
- Implement property-based testing for complex algorithms or data structures.
6. Documentation:
- Use Dart's documentation comments extensively.
- Provide examples in documentation for all public APIs.
- Create architecture decision records (ADRs) for significant design choices.
7. Internationalization and localization:
- Design with i18n in mind from the start.
- Use Dart's intl package for formatting dates, numbers, and plurals.
8. Error handling and logging:
- Implement a consistent error handling strategy across all packages.
- Create custom exception classes where appropriate.
- Implement structured logging with different log levels.
9. Security:
- Implement security best practices, including input validation, output encoding, and CSRF protection.
- Use secure random number generation for cryptographic operations.
- Implement rate limiting and throttling mechanisms.
10. Dependency management:
- Use Dart's pub tool effectively for package management.
- Consider implementing a monorepo structure for managing multiple packages.
11. Compatibility layers:
- Implement compatibility layers or wrappers to ease migration from Angel3 to the new framework.
- Provide migration scripts or tools where possible.
12. Extensibility:
- Design components with extensibility in mind, allowing for easy customization and overriding of default behaviors.
- Implement plugin systems where appropriate.
13. Configuration:
- Implement a flexible configuration system that supports different environments (development, testing, production).
- Support both file-based and environment variable-based configuration.
14. CLI tools:
- Develop CLI tools to assist in common development tasks (e.g., generating boilerplate code, running migrations).
- Ensure CLI tools are cross-platform compatible.
15. Database abstraction:
- Implement database migrations and seeders.
- Support multiple database systems, including NoSQL databases.
16. API design:
- Follow RESTful principles when designing APIs.
- Consider implementing GraphQL support.
17. Caching strategies:
- Implement various caching mechanisms (in-memory, file-based, distributed).
- Provide cache invalidation strategies.
18. Scalability:
- Design components with horizontal scalability in mind.
- Implement support for distributed systems and microservices architecture.
19. Metrics and monitoring:
- Implement instrumentation for gathering metrics.
- Provide hooks for integrating with monitoring systems.
20. Dependency injection:
- Implement a robust dependency injection system.
- Support both constructor and property injection.
21. Reflection and metadata:
- Utilize Dart's reflection capabilities where appropriate.
- Implement custom metadata annotations for declarative programming.
22. Error reporting:
- Implement integration with error reporting services (e.g., Sentry).
- Provide detailed stack traces and context for errors.
23. Code generation:
- Utilize Dart's build system for code generation where appropriate.
- Implement source code generators for repetitive tasks.
24. Versioning:
- Follow semantic versioning principles.
- Maintain a detailed changelog.
25. Community engagement:
- Set up issue templates and contribution guidelines on GitHub.
- Implement a code of conduct for the project.
26. Null Safety
- Implement sound null safety throughout the entire codebase.
- Utilize Dart's null safety features, including:
- Nullable and non-nullable types
- Late variables
- Null-aware operators
- Perform null checks where necessary and provide clear documentation on nullability for all public APIs.
- Use the `required` keyword for named parameters that must not be null.
- Leverage the `?`, `!`, and `??` operators appropriately to handle potential null values.
- Implement proper error handling for cases where null values are unexpected.
- When interfacing with external code or APIs that are not null-safe:
- Use the `dynamic` type or appropriate cast operations cautiously
- Utilize the `Never` type for functions that never return normally (i.e., always throw an exception or loop forever).
- Consider using the `late` keyword for variables that are initialized after their declaration but before they're used.
- When working with collections:
- Prefer using nullable item types (e.g., `List<String?>`) over nullable collections (e.g., `List<String>?`) where appropriate
- Use static analysis tools to catch potential null safety issues early in the development process.
- When migrating existing code:
- Use the Dart migration tool
- Carefully review all changes
- Educate contributors on null safety best practices and include null safety checks in code review processes.
Here are some notes that you should always keep in mind when working with the project
Here's the content formatted in Markdown:
## General Guidelines
- Always consider the idiomatic Dart approach when implementing Laravel features.
- Maintain compatibility with existing Angel3 applications where possible.
- Prioritize performance and scalability in all implementations.
- Write comprehensive tests for each component, aiming for high code coverage.
- Document all public APIs and provide usage examples.
- Consider cross-platform compatibility (server, web, mobile) where applicable.
- Keep security as a top priority, especially when implementing authentication and encryption features.
- Regularly refactor and optimize code as the project progresses.
- Engage with the Angel3 community for feedback and contributions throughout the development process.
## Advanced Implementation Considerations
- When implementing advanced features like Telescope or Dusk, consider how they can be adapted to work well in a Dart ecosystem.
- Pay special attention to how Facades and Macroable traits can be implemented in Dart, as these are core to Laravel's flexibility but may not have direct equivalents in Dart.
- For packages like Scout and Passport, research Dart-specific best practices for implementing search and OAuth2 functionalities.
- When working on Blade-like templating, consider how to balance between staying close to Blade's syntax and leveraging Dart's language features.
## Dart-Specific Considerations
- Always consider the implications of Dart's strong typing when implementing dynamic features from Laravel.
- Look for opportunities to leverage Dart's unique features, such as isolates for concurrency, where appropriate.
The Project Road Map is in @Roadmap Book
You now have access to all the information that all team members need to start working on the project.

View file

@ -0,0 +1,6 @@
{
"image": "dart:3.4",
"forwardPorts": [3000,5000],
"features": {
}
}

1
.fork Normal file
View file

@ -0,0 +1 @@
Hard-Fork of Angel3 Master Repo 2024-10-01 Advance to Version 9.x

3
.github/FUNDING.yml vendored
View file

@ -1,3 +0,0 @@
# These are supported funding model platforms
github: [thosakwe]

56
.gitignore vendored
View file

@ -14,7 +14,6 @@
.metals/
build/
#**/packages/
packages/hubbub/
# Files created by dart2js
# (Most Dart developers will use pub build to compile Dart, use/modify these
@ -37,38 +36,34 @@ pubspec.lock
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff:
.idea/workspace.xml
.idea/tasks.xml
.idea/dictionaries
.idea/vcs.xml
.idea/jsLibraryMappings.xml
# If you're building an application, you may want to check-in your pubspec.lock
#pubspec.lock
pubspec_overrides.yaml
pubspec.yaml.bak
# Sensitive or high-churn files:
.idea/dataSources.ids
.idea/dataSources.xml
.idea/dataSources.local.xml
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml
# User-specific stuff:
## VsCode
.vscode/
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
# IntelliJ
.idea/
/out/
.idea_modules/
# Gradle:
.idea/gradle.xml
.idea/libraries
# Mongo Explorer plugin:
.idea/mongoSettings.xml
## File-based project format:
*.iws
## Plugin-specific files:
# IntelliJ
/out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
@ -79,14 +74,15 @@ crashlytics.properties
crashlytics-build.properties
fabric.properties
### VSCode template
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
# Others
logs/
*.pem
.DS_Store
server_log.txt
backup/
# ignore protevus platform
#wspace/
# temp
#inbox/

2
.pubignore Normal file
View file

@ -0,0 +1,2 @@
.DS_Store
tasks.json

17
.vscode/settings.json vendored
View file

@ -1,5 +1,18 @@
{
"files.watcherExclude": {
"**/target": true
}
"**/target": true
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"beautify.language": {
"html": ["html"],
"css": [],
"js": []
},
"editor.codeActionsOnSave": {
"source.fixAll.markdownlint": "explicit"
},
"cmake.configureOnOpen": false
}

36
AUTHORS.md Normal file
View file

@ -0,0 +1,36 @@
# Protevus Platform Authors
## Core Team
- Patrick Stewart <p.stewart@protevus.com> (Project Lead)
- Vacant Spot <jane.smith@example.com> (Lead Developer)
- Vacant Spot <bob.johnson@example.com> (Developer)
## AI Team
- Cody <cody@protevus.com> (AI Coding Assistant)
- Claude <claude@protevus.com> (AI Coding Assistant)
- Code Copilot <c.copilot@protevus.com> (AI Coding Assistant)
- Keymate <keymate@protevus.com> (AI Coding Assistant)
## Contributors
- Alice Williams <alice.williams@example.com>
- Implemented the ORM module
- Contributed to the database abstraction layer
- Charlie Brown <charlie.brown@example.com>
- Implemented the authentication and authorization system
- Contributed to the event broadcasting and queueing system
- Eve Green <eve.green@example.com>
- Improved the routing system
- Contributed to the middleware implementation
- Michael Davis <michael.davis@example.com>
- Worked on the caching and performance optimization features
- Contributed to the documentation
# Additional contributors (in alphabetical order)
- Vacant Spot

View file

@ -1,56 +0,0 @@
# 3.0.1 (NNBD)
* Changed Dart SDK requirements for all packages to ">=2.12.0 <3.0.0" to support NNBD.
* Updated pretty_logging to 2.0.0
* Updated angel_http_exception to 2.0.0
* Updated angel_cli to 3.0.0. (Rename not working)
# 3.0.0 (Non NNBD)
* Changed Dart SDK requirements for all packages to ">=2.10.0 <3.0.0"
* Updated pretty_logging to 2.0.0
* Updated angel_http_exception to 2.0.0
* Updated angel_cli to 3.0.0. (Rename not working)
* Updated angel_route to 4.0.0
* Updated angel_model to 2.0.0
* Updated angel_container to 2.0.0
* Updated angel_framework to 3.0.0
* Updated angel_auth to 3.0.0
* Updated angel_configuration to 3.0.0
* Updated jael to 3.0.0
* Updated jael_preprocessor to 3.0.0
* Updated validate to 3.0.0
* Added and updated json_god to 3.0.0
* Updated angel_client to 3.0.0
* Updated angel_websocket to 3.0.0 (3/3 tests passed)
* Updated test to 3.0.0
* Updated angel_jael to 3.0.0 (Issue with 2 dependencies)
* Added pub_sub and updated to 3.0.0
* Updated production to 2.0.0
* Updated hot to 3.0.0
* Updated static to 3.0.0
* Update basic-sdk-2.12.x boilerplate
* Updated angel_serialize to 3.0.0
* Updated angel_serialize_generator to 3.0.0
* Updated angel_orm to 3.0.0
* Updated angel_migration to 3.0.0
* Updated angel_orm_generator to 3.0.0 (use a fork of postgres)
* Updated angel_migration_runner to 3.0.0
* Updated angel_orm_test to 1.0.0
* Updated angel_orm_postgres to 2.0.0
* Update orm-sdk-2.12.x boilerplate
* Updated angel_auth_oauth2 to 3.0.0
* Updated angel_auth_cache to 3.0.0
* Updated angel_auth_cors to 3.0.0
* Updated angel_container_generator to 2.0.0
* Updated angel_file_service to 3.0.0
* Updated angel_eventsource to 2.0.0 (use a fork of eventsource)
* Updated angel_auth_twitter to 3.0.0 (use a fork of twitter and oauth)
# 2.2.0
* Changed Dart SDK requirements for all packages to ">=2.10.0 <2.12.0"
* Upgraded 3rd party libraries to the latest version prior to dart 2.12
* Fixed broken code due to 3rd party libraries update
* Revert packages/validate from version 3.0 to version 2.2
# 2.1.x and below
* Refer to the orginal repo before the fork

39
CODE_OF_CONDUCT.md Normal file
View file

@ -0,0 +1,39 @@
# Protevus Platform Code of Conduct
## Our Pledge
We, as members, contributors, and leaders of the Protevus Platform community, pledge to make participation in our project and community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our community include:
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
Examples of unacceptable behavior include:
- The use of sexualized language or imagery, and sexual attention or advances of any kind
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned with this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [insert email

71
CONTRIBUTING.md Normal file
View file

@ -0,0 +1,71 @@
# Contributing to the Protevus Platform
Welcome to the Protevus Platform project! We appreciate your interest in contributing to our open-source application server platform. This document outlines the guidelines and best practices for contributing to the project.
## Code of Conduct
By participating in this project, you are expected to uphold our [Code of Conduct](CODE_OF_CONDUCT.md). Please review it to understand the behavior standards expected of all contributors.
## Ways to Contribute
There are many ways to contribute to the Protevus Platform project, including:
- Reporting bugs or issues
- Suggesting new features or improvements
- Submitting pull requests with bug fixes or new features
- Improving documentation
- Participating in discussions and providing feedback
## Getting Started
1. Fork the repository and create a new branch for your contribution.
2. Follow the project's coding standards and conventions.
3. Write clear and descriptive commit messages.
4. Test your changes locally before submitting a pull request.
5. Submit a pull request with a detailed description of your changes.
## Branching Conventions
When creating a new branch for your contribution, please follow these naming conventions:
topic names.
```
docs/<description>
fix/<username>-<description>
feature/<username>-<description>
refactor/<username>-<description>
```
If the scope of the issue changes for any reason, please create a new branch with the appropriate naming convention.
## Local Testing
While we provide CI/CD through GitHub Actions, it is recommended to set up your local testing environment to run tests before pushing commits. Follow the instructions in the project's documentation or the CI configuration files to set up your local testing environment.
### Running Tests
Currently, there are three sets of tests that need to be run:
```bash
melos test-unit
# These two need to be run inside packages/conduit
dart test -j1 test/* # use dart test -j1 for Windows and macOS
dart tool/generated_test_runner.dart
```
The first command will run all the unit tests in the Conduit package and its dependencies. The last two commands test CLI components and string-compiled code, respectively.
## Pull Request Requirements
Document the intent and purpose of the pull request.
All non-documentation pull requests must include automated tests that cover the new code, including failure cases.
If tests work locally but not on the CI, please mention @j4qfrost on the pull request or reach out on the Discord server.
## Commits and Versioning
The project uses melos for tooling, which provides autoversioning based on conventional commits. Commits to the master branch will usually be squashed from pull requests, so ensure that the pull request title uses conventional commits to trigger versioning and publishing CI. You do not need to use conventional commits on each commit to your branch.
## Licensing
Protevus Platform is released under the [MIT License](LICENSE).
Thank you for your interest in contributing to the Protevus Platform project! We look forward to your contributions and appreciate your efforts to make this project better.

View file

@ -1,6 +1,6 @@
The MIT License (MIT)
MIT License
Copyright (c) 2016 angel-dart
Copyright (c) 2024 Protevus
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

144
README.md
View file

@ -1,69 +1,113 @@
[![The Angel Framework](https://angel-dart.github.io/assets/images/logo.png)](https://angel-dart.dev)
<p align="center"><a href="https://protevus.com" target="_blank"><img src="https://git.protevus.com/protevus/branding/raw/branch/main/protevus-logo-bg.png"></a></p>
[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/angel_dart/discussion)
[![Pub](https://img.shields.io/pub/v/angel_framework.svg)](https://pub.dartlang.org/packages/angel_framework)
[![Build status](https://travis-ci.org/angel-dart/framework.svg?branch=master)](https://travis-ci.org/angel-dart/framework)
![License](https://img.shields.io/github/license/angel-dart/framework.svg)
# Protevus Platform
**A polished, production-ready backend framework in Dart.**
Protevus Platform is a highly versatile and extensible application server platform for the Dart programming language. It is a hard fork of the Angel3 framework, inspired by Express.js and Laravel, aiming to provide a familiar and Laravel-compatible API while leveraging the power of Dart.
-----
## About
Angel is a full-stack Web framework in Dart. It aims to
streamline development by providing many common features
out-of-the-box in a consistent manner.
> **Note:** This repository contains the core code of the Protevus Platform. If you want to build an application using Protevus, visit the main [Protevus repository](https://github.com/protevus/protevus).
With features like the following, Angel is the all-in-one framework you should choose to build your next project:
* GraphQL Support
* PostgreSQL ORM
* Dependency Injection
* Static File Handling
* And much more...
## About Protevus
See all the packages in the `packages/` directory.
Protevus Platform allows developers to leverage their existing Laravel knowledge and experience in the Dart ecosystem. It combines the best features of Angel3 with Laravel-inspired design patterns and APIs, creating a powerful and familiar environment for web application development.
## Installation & Setup
## AI Assistance
Once you have [Dart](https://www.dartlang.org/) installed, bootstrapping a project is as simple as running a few shell commands:
The Protevus Platform project utilizes AI assistance in various aspects of its development process. We believe in leveraging the capabilities of AI to enhance productivity, code quality, and overall project progress while maintaining transparency and adhering to ethical practices.
Install the [Angel CLI](https://github.com/angel-dart/cli):
### AI Tools and Models
```bash
pub global activate angel_cli
The following AI tools and models have been primarily employed in the development of the Protevus Platform:
- **Continue** (continue.dev)
- **OpenRouter** (openrouter.ai)
- **Claude** (claude.ai)
- **Codestral** (mistral.ai)
- **Voyage** (voyage.ai)
- Other tools and LLMs
### Guidelines and Limitations
While AI assistance has been invaluable in accelerating certain aspects of development, we adhere to strict guidelines to ensure quality, security, and ethical use of AI in our development process.
## Features
- **Laravel API Compatibility**: Familiar API for Laravel developers
- **Modular Architecture**: Separating core components and libraries
- **High Performance**: Leverages Dart's efficient event-driven model and isolates for concurrent processing.
- **Asynchronous Processing**: Built on Dart's async-await paradigm for non-blocking operations.
- **Extensibility**: Support for custom extensions
- **Community-Driven**: Open-source principles and community contributions
- **Modular Packages**: Standalone Dart packages for each component
- **Comprehensive Routing**: Powerful routing capabilities
- **Dependency Injection**: Built-in support
- **Middleware Support**: For filtering HTTP requests
- **Authentication & Authorization**: Robust tools
- **Database Abstraction**: Query builder and ORM
- **Queueing System**: Manage background tasks
- **Event Broadcasting**: Real-time event capabilities
- **Full-Stack Experience**: Server-side views and Flutter support for frontends
- **WebSocket Support**: Real-time communication
- **ORM and Database Integration**: Work with various database systems
- **Templating Engine**: For server-side rendering
- **Static File Serving**: Built-in middleware
- **Scalability**: Designed to handle multiple concurrent connections efficiently.
- **Testing Utilities**: Comprehensive testing support
## Getting Started
To get started with Protevus Platform, follow these steps:
1. **Install Dart**: Ensure you have the Dart SDK installed on your system.
2. **Create a new project**:
- dart create -t console my_protevus_app cd
- my_protevus_app
3. **Add Protevus dependencies**: Add the following to your `pubspec.yaml`:
```yaml
dependencies:
protevus_framework: ^1.0.0
protevus_configuration: ^1.0.0
```
Bootstrap a project:
```bash
angel init hello
4. **Run pub get**:
```shell
dart pub get
```
5. **Create your first Protevus application**: Replace the contents of bin/my_protevus_app.dart with:
```dart
import 'package:protevus_framework/protevus_framework.dart';
import 'package:protevus_framework/http.dart';
You can even have your server run and be *hot-reloaded* on file changes:
void main() async {
var app = Protevus();
var http = ProtevusHttp(app);
```bash
dart --observe bin/dev.dart
app.get('/', (req, res) => res.write('Hello, Protevus!'));
await http.startServer('localhost', 3000);
print('Server listening at http://localhost:3000');
}
```
6. **Run your application**:
```shell
dart run bin/my_protevus_app.dart
```
Visit http://localhost:3000 in your browser to see your Protevus app in action!
Next, check out the [detailed documentation](https://docs.angel-dart.dev/v/2.x) to learn to flesh out your project.
## Documentation
Comprehensive documentation for Protevus Platform is available at protevus.com/docs/platform. The documentation covers installation, configuration, usage, and advanced topics, including guides and examples.
## Development
## Plugins and Packages
Protevus Platform offers a wide range of official plugins and packages to extend its functionality, building upon the Angel3 ecosystem and introducing new Laravel-inspired components.
* Install development version of Angel CLI
`dart pub global activate --source path ./packages/cli`
`dart pub global activate --source git https://github.com/dukefirehawk/angel/packages/cli`
## Community and Support
GitHub Discussions: github.com/protevus/platform/discussions
Twitter: @Protevus
Contributing
We welcome contributions from the community! Please read our CONTRIBUTING.md for guidelines on how to contribute to Protevus Platform.
## Examples and Documentation
Visit the [documentation](https://docs.angel-dart.dev/v/2.x)
for dozens of guides and resources, including video tutorials,
to get up and running as quickly as possible with Angel.
## License
Protevus Platform is open-source software licensed under the MIT license.
Examples and complete projects can be found
[here](https://github.com/angel-dart/examples-v2).
You can also view the [API Documentation](http://www.dartdocs.org/documentation/angel_framework/latest).
There is also an [Awesome Angel :fire:](https://github.com/angel-dart/awesome-angel) list.
## Contributing
Interested in contributing to Angel? Start by reading the contribution guide [here](CONTRIBUTING.md).
## Acknowledgements
Protevus Platform is built upon the foundation of Angel3 and inspired by Laravel. We'd like to thank the creators and contributors of both these frameworks for their invaluable work in the web development ecosystem.

49
SECURITY.md Normal file
View file

@ -0,0 +1,49 @@
# Protevus Platform Security
The Protevus Platform team takes security seriously and is committed to ensuring the security and integrity of the project. This document outlines the security practices, policies, and guidelines followed by the project.
## Reporting Security Vulnerabilities
If you discover a security vulnerability within the Protevus Platform, we appreciate your help in disclosing it responsibly. Please follow these steps:
1. **Do not** create a public issue or disclose the vulnerability publicly.
2. Send an email to the Protevus Platform security team at [security@protevus.com](mailto:security@protevus.com) with details about the vulnerability, including:
- A brief description of the vulnerability
- Steps to reproduce the issue
- Any potential impact or consequences
- Your contact information (optional)
3. The security team will acknowledge your report and work with you to investigate and address the vulnerability.
4. Once the vulnerability has been addressed, you will be credited in the release notes and the security advisory.
We appreciate your cooperation in responsibly disclosing security vulnerabilities, as it helps us maintain the integrity and security of the Protevus Platform.
## Security Practices
The Protevus Platform team follows industry-standard security practices to ensure the security and integrity of the project:
- **Code Reviews**: All code contributions undergo thorough code reviews by the core team to identify and mitigate potential security risks.
- **Secure Coding Practices**: The project adheres to secure coding practices, including input validation, output encoding, and protection against common web application vulnerabilities (e.g., XSS, CSRF, SQL injection).
- **Dependency Management**: Third-party dependencies are regularly monitored and updated to address known vulnerabilities.
- **Security Testing**: The project undergoes regular security testing, including static code analysis, dynamic application security testing (DAST), and penetration testing.
- **Secure Development Lifecycle**: The project follows a secure development lifecycle, incorporating security considerations throughout the development process, from design to deployment.
## Security Advisories
In the event of a security vulnerability being discovered and addressed, the Protevus Platform team will release a security advisory containing the following information:
- A description of the vulnerability
- Affected versions
- Mitigation steps or patches
- Credit to the individuals who reported the vulnerability (if desired)
Security advisories will be published on the project's website and communicated to the community through appropriate channels.
## Responsible Disclosure
The Protevus Platform team believes in responsible disclosure of security vulnerabilities. We will work with researchers and security professionals to address vulnerabilities in a timely and responsible manner, ensuring that the necessary fixes and mitigations are in place before publicly disclosing the details of the vulnerability.
## Conclusion
The security and integrity of the Protevus Platform are of utmost importance to the project team. We are committed to following industry-standard security practices, responsibly disclosing and addressing vulnerabilities, and maintaining open communication with the community regarding security matters.
If you have any questions or concerns regarding the security of the Protevus Platform, please contact the security team at [security@protevus.com](mailto:security@protevus.com).

View file

@ -1,9 +0,0 @@
# Todo
### Container/angel_container_generator
* test/reflector_test.reflectab.dart - Changed ImplicitGetterMirrorImpl() from 5 to 3 parameters (revisit later)
* A user forum
* Updated User Guide

30
analysis_options.yaml Normal file
View file

@ -0,0 +1,30 @@
# This file configures the static analysis results for your project (errors,
# warnings, and lints).
#
# This enables the 'recommended' set of lints from `package:lints`.
# This set helps identify many issues that may lead to problems when running
# or consuming Dart code, and enforces writing Dart using a single, idiomatic
# style and format.
#
# If you want a smaller set of lints you can change this to specify
# 'package:lints/core.yaml'. These are just the most critical lints
# (the recommended set includes the core lints).
# The core lints are also what is used by pub.dev for scoring packages.
include: package:lints/recommended.yaml
# Uncomment the following section to specify additional rules.
# linter:
# rules:
# - camel_case_types
# analyzer:
# exclude:
# - path/to/excluded/files/**
# For more information about the core and recommended set of lints, see
# https://dart.dev/go/core-lints
# For additional information about configuring this file, see
# https://dart.dev/guides/language/analysis-options

75
devops/README.md Normal file
View file

@ -0,0 +1,75 @@
# Protevus Platform DevOps
This directory contains Docker and Kubernetes configurations for the Protevus Platform. It is organized to support our containerization and orchestration needs across different environments.
## Directory Structure
```
devops/
├── docker/
│ ├── Dockerfile
│ ├── docker-compose.yml
│ └── .dockerignore
├── kubernetes/
│ ├── deployment.yaml
│ ├── service.yaml
│ ├── ingress.yaml
│ └── configmap.yaml
├── scripts/
│ ├── docker-build.sh
│ ├── docker-push.sh
│ ├── k8s-deploy.sh
│ └── k8s-rollback.sh
└── README.md
```
### docker/
This directory contains Docker-related files for building and running the Protevus Platform in containers.
- `Dockerfile`: Defines the container image for the Protevus Platform.
- `docker-compose.yml`: Configures multi-container Docker applications for local development.
- `.dockerignore`: Specifies which files and directories should be excluded when building Docker images.
### kubernetes/
The kubernetes/ directory houses Kubernetes manifests for deploying and managing the Protevus Platform in a Kubernetes cluster.
- `deployment.yaml`: Defines the deployment configuration for the Protevus Platform.
- `service.yaml`: Specifies the service configuration for exposing the platform.
- `ingress.yaml`: Configures ingress rules for routing external traffic to the service.
- `configmap.yaml`: Stores configuration data that can be consumed by pods.
### scripts/
This directory contains utility scripts for Docker and Kubernetes operations.
- `docker-build.sh`: Script for building Docker images.
- `docker-push.sh`: Script for pushing Docker images to a registry.
- `k8s-deploy.sh`: Script for deploying the application to a Kubernetes cluster.
- `k8s-rollback.sh`: Script for rolling back a Kubernetes deployment.
## Usage Guidelines
1. Use the provided scripts in the `scripts/` directory for common Docker and Kubernetes operations.
2. Ensure all configuration files are properly parameterized for different environments (dev, staging, production).
3. Keep sensitive information (like passwords and API keys) out of these files and use Kubernetes secrets instead.
4. Regularly update and test these configurations as the Protevus Platform evolves.
## Deployment Process
1. Build the Docker image using `scripts/docker-build.sh`.
2. Push the image to the container registry with `scripts/docker-push.sh`.
3. Deploy to Kubernetes using `scripts/k8s-deploy.sh`.
4. If needed, rollback the deployment using `scripts/k8s-rollback.sh`.
## Contributing
When contributing to the DevOps configurations:
1. Test all changes thoroughly in a non-production environment before applying to production.
2. Document any new scripts or significant changes to existing configurations.
3. Follow Kubernetes and Docker best practices for security and efficiency.
4. Submit a pull request with a clear description of the changes and their purpose.
For any questions or suggestions regarding the DevOps setup, please contact the Protevus Platform infrastructure team.

172
devops/docker/README.md Normal file
View file

@ -0,0 +1,172 @@
# Docker Services
The required applications by the framework can be run using the docker compose files provided in this folder.
## PostreSQL
### Starting the PostreSQL container
```bash
docker compose -f docker-compose-pg.yml -p pg up -d
```
### Stopping the PostreSQL container
```bash
docker compose -f docker-compose-pg.yml -p pg stop
docker compose -f docker-compose-pg.yml -p pg down
```
### Checking the PostreSQL container log
```bash
docker logs docker-pg-1 -f
```
### Running psql
```bash
docker exec -it <container id> /bin/bash
psql --username postgres
```
### Create PostgreSQL database, user and grant access
```sql
create database orm_test;
create user test with encrypted password 'test123';
grant all privileges on database orm_test to test;
```
## MariaDB
### Starting the MariaDB container
```bash
docker compose -f docker-compose-mariadb.yml -p maria up -d
```
### Stopping the MariaDB container
```bash
docker compose -f docker-compose-mariadb.yml -p maria stop
docker compose -f docker-compose-mariadb.yml -p maria down
```
### Checking the MariaDB container log
```bash
docker logs maria-mariadb-1 -f
```
### Create MariaDB database, user and grant access
```sql
create database orm_test;
-- Granting localhost access only
create user 'test'@'localhost' identified by 'test123';
grant all privileges on orm_test.* to 'test'@'localhost';
-- Granting localhost and remote access
create user 'test'@'%' identified by 'test123';
grant all privileges on orm_test.* to 'test'@'%';
```
## MySQL
### Starting the MySQL container
```bash
docker compose -f docker-compose-mysql.yml -p mysql up -d
```
### Stopping the MySQL container
```bash
docker compose -f docker-compose-mysql.yml -p mysql stop
docker compose -f docker-compose-mysql.yml -p mysql down
```
### Checking the MySQL container log
```bash
docker logs mysql-mysql-1 -f
```
### Create MySQL database, user and grant access
```sql
create database orm_test;
-- Granting localhost access only
create user 'test'@'localhost' identified by 'test123';
grant all privileges on orm_test.* to 'test'@'localhost';
-- Granting localhost and remote access
create user 'test'@'%' identified by 'test123';
grant all privileges on orm_test.* to 'test'@'%';
```
## MongoDB
### Starting the MongoDB container
```bash
docker compose -f docker-compose-mongo.yml -p mongo up -d
```
### Stopping the MongoDB container
```bash
docker compose -f docker-compose-mongo.yml -p mongo stop
docker compose -f docker-compose-mongo.yml -p mongo down
```
### Checking the MongoDB container log
```bash
docker logs mongo-mongo-1 -f
```
## rethinkDB
### Starting the rethinkDB container
```bash
docker compose -f docker-compose-rethinkdb.yml -p rethink up -d
```
### Stopping the rethinkDB container
```bash
docker compose -f docker-compose-rethinkdb.yml -p rethink stop
docker compose -f docker-compose-rethinkdb.yml -p rethink down
```
### Checking the rethinkDB container log
```bash
docker logs rethink-rethinkdb-1 -f
```
## Redis
### Starting the Redis container
```bash
docker compose -f docker-compose-redis.yml -p redis up -d
```
### Stopping the Redis container
```bash
docker compose -f docker-compose-redis.yml -p redis stop
docker compose -f docker-compose-redis.yml -p redis down
```
### Checking the Redis container log
```bash
docker logs redis-redis-1 -f
```

View file

@ -0,0 +1,19 @@
services:
mariadb:
image: mariadb:latest
restart: "no"
ports:
- "3306:3306"
environment:
- MARIADB_ROOT_PASSWORD=Qwerty
volumes:
- "mariadb:/var/lib/mysql"
networks:
- appnet
volumes:
mariadb:
driver: local
networks:
appnet:

View file

@ -0,0 +1,37 @@
services:
mongo:
image: mongo
restart: no
ports:
- 27017:27017
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: Qwerty
MONGO_INITDB_DATABASE: local
volumes:
- "mongo:/data/db"
networks:
- appnet
mongo-express:
image: mongo-express
restart: no
depends_on:
- mongo
ports:
- 8081:8081
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: root
ME_CONFIG_MONGODB_ADMINPASSWORD: Qwerty
ME_CONFIG_MONGODB_URL: mongodb://root:Qwerty@mongo:27017/
ME_CONFIG_BASICAUTH: false
networks:
- webnet
volumes:
mongo:
driver: local
networks:
appnet:

View file

@ -0,0 +1,19 @@
services:
mysql:
image: mysql:latest
restart: "no"
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=Qwerty
volumes:
- "mysql:/var/lib/mysql"
networks:
- appnet
volumes:
mysql:
driver: local
networks:
appnet:

View file

@ -0,0 +1,31 @@
services:
pgdb:
image: postgres:latest
restart: "no"
ports:
- "5432:5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
volumes:
- "db:/var/lib/postgresql/data"
networks:
- appnet
pgadmin4:
image: dpage/pgadmin4:latest
restart: "no"
ports:
- "5050:80"
environment:
- PGADMIN_DEFAULT_EMAIL=admin@mydomain.com
- PGADMIN_DEFAULT_PASSWORD=Qwerty
networks:
- appnet
volumes:
db:
driver: local
networks:
appnet:

View file

@ -0,0 +1,20 @@
services:
redis:
image: redis:latest
restart: "no"
ports:
- "5432:5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
volumes:
- "redis:/data"
networks:
- appnet
volumes:
redis:
driver: local
networks:
appnet:

View file

@ -0,0 +1,19 @@
services:
rethinkdb:
image: rethinkdb:latest
restart: "no"
ports:
- "8080:8080"
- "28015:28015"
- "29015:29015"
volumes:
- "rethinkdb:/data"
networks:
- appnet
volumes:
rethinkdb:
driver: local
networks:
appnet:

10
docs/Testing.md Normal file
View file

@ -0,0 +1,10 @@
# Performance Testing
The performance test can be run with the following tools.
## WRT
```bash
wrk -t12 -c400 -d30s http://localhost:8080/query?queries=20
```
This runs a benchmark for 30 seconds, using 12 threads, and keeping 400 HTTP connections open.

68
helpers/README.md Normal file
View file

@ -0,0 +1,68 @@
# Protevus Platform Helpers
This directory contains various helper functionalities, tools, and utilities for the Protevus Platform. It is organized into subdirectories to maintain a clear structure and separation of concerns.
## Directory Structure
```
helpers/
├── cli/
├── console/
├── tools/
└── utilities/
```
### cli/
This directory contains command-line interface tools and scripts specific to the Protevus Platform. These are typically used for development, deployment, or maintenance tasks that are run directly from the command line.
Examples:
- Database migration scripts
- Code generation tools
- Deployment scripts
### console/
The console/ directory houses console commands and utilities, similar to Laravel's Artisan commands. These are interactive tools that provide a user-friendly interface for various platform operations.
Examples:
- REPL (Read-Eval-Print Loop) for the Protevus Platform
- Interactive configuration tools
- Database seeding commands
### tools/
This directory is for larger, more complex helper applications or scripts used in development, testing, or deployment of the Protevus Platform. These tools often combine multiple functionalities or interact with external services.
Examples:
- Automated testing suites
- Performance profiling tools
- Documentation generators
### utilities/
The utilities/ directory contains general-purpose utility functions and smaller helper scripts. These are typically reusable across different parts of the platform and provide common functionality.
Examples:
- String manipulation functions
- Date and time helpers
- File system operations
## Usage Guidelines
1. Place new helpers in the appropriate subdirectory based on their purpose and complexity.
2. Maintain consistency in naming conventions and file structures within each subdirectory.
3. Document each helper, tool, or utility with clear comments and usage examples.
4. Update this README when adding new significant helpers or changing the structure.
## Contributing
When contributing new helpers:
1. Ensure your code follows the Protevus Platform coding standards.
2. Write tests for your helpers when applicable.
3. Update or create documentation for new functionalities.
4. Submit a pull request with a clear description of the new helper and its purpose.
For any questions or suggestions regarding the helpers structure, please contact the Protevus Platform core development team.

20
melos.yaml Normal file
View file

@ -0,0 +1,20 @@
name: protevus_platform
repository: https://github.com/protevus/platform
packages:
- core/**
- packages/**
- sandbox/**
- wspace/**
- examples/**
command:
version:
# Generate commit links in package changelogs.
linkToCommits: true
# Only allow versioning to happen on main branch.
branch: master
workspaceChangelog: true
ide:
intellij:
enabled: false

View file

@ -1,15 +1,32 @@
# Created by .ignore support plugin (hsz.mobi)
# See https://www.dartlang.org/tools/private-files.html
# Files and directories created by pub
.dart_tool
.packages
.pub/
build/
# If you're building an application, you may want to check-in your pubspec.lock
pubspec.lock
# Directory created by dartdoc
# If you don't generate documentation locally you can remove this line.
doc/api/
### Dart template
# See https://www.dartlang.org/tools/private-files.html
# Files and directories created by pub
.buildlog
.packages
# SDK 1.20 and later (no longer creates packages directories)
# Older SDK versions
# (Include if the minimum SDK version specified in pubsepc.yaml is earlier than 1.20)
.project
.pub/
build/
.buildlog
**/packages/
# Files created by dart2js
# (Most Dart developers will use pub build to compile Dart, use/modify these
# rules if you intend to use dart2js directly
@ -22,36 +39,17 @@ build/
*.info.json
# Directory created by dartdoc
doc/api/
# Don't commit pubspec lock file
# (Library packages only! Remove pattern if developing an application package)
pubspec.lock
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff:
.idea/workspace.xml
.idea/tasks.xml
.idea/dictionaries
.idea/vcs.xml
.idea/jsLibraryMappings.xml
# Sensitive or high-churn files:
.idea/dataSources.ids
.idea/dataSources.xml
.idea/dataSources.local.xml
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml
# Gradle:
.idea/gradle.xml
.idea/libraries
# Mongo Explorer plugin:
.idea/mongoSettings.xml
## VsCode
.vscode/
## File-based project format:
*.iws
@ -59,9 +57,8 @@ pubspec.lock
## Plugin-specific files:
# IntelliJ
.idea/
/out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
@ -72,5 +69,4 @@ com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
.dart_tool
.DS_Store

View file

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/.pub" />
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/build" />
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Dart SDK" level="project" />
<orderEntry type="library" name="Dart Packages" level="project" />
</component>
</module>

View file

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
<component name="ProjectInspectionProfilesVisibleTreeState">
<entry key="Project Default">
<profile-state>
<expanded-state>
<State>
<id />
</State>
<State>
<id>General</id>
</State>
<State>
<id>XPath</id>
</State>
</expanded-state>
<selected-state>
<State>
<id>AngularJS</id>
</State>
</selected-state>
</profile-state>
</entry>
</component>
</project>

View file

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/angel_auth.iml" filepath="$PROJECT_DIR$/.idea/angel_auth.iml" />
</modules>
</component>
</project>

View file

@ -1,8 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="All Tests" type="DartTestRunConfigurationType" factoryName="Dart Test" singleton="true">
<option name="filePath" value="$PROJECT_DIR$/test" />
<option name="scope" value="FOLDER" />
<option name="testRunnerOptions" value="-j 4" />
<method />
</configuration>
</component>

View file

@ -1,6 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Auth Token Tests" type="DartTestRunConfigurationType" factoryName="Dart Test" singleton="true">
<option name="filePath" value="$PROJECT_DIR$/test/auth_token_test.dart" />
<method />
</configuration>
</component>

View file

@ -1,6 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Callback Tests" type="DartTestRunConfigurationType" factoryName="Dart Test" singleton="true">
<option name="filePath" value="$PROJECT_DIR$/test/callback_test.dart" />
<method />
</configuration>
</component>

View file

@ -1,6 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Local Tests" type="DartTestRunConfigurationType" factoryName="Dart Test" singleton="true">
<option name="filePath" value="$PROJECT_DIR$/test/local_test.dart" />
<method />
</configuration>
</component>

View file

@ -1,8 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="preserve existing user in callback_test.dart" type="DartTestRunConfigurationType" factoryName="Dart Test" singleton="true" nameIsGenerated="true">
<option name="filePath" value="$PROJECT_DIR$/test/callback_test.dart" />
<option name="scope" value="GROUP_OR_TEST_BY_NAME" />
<option name="testName" value="preserve existing user" />
<method />
</configuration>
</component>

View file

@ -1,7 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="tests in protect_cookie_test.dart" type="DartTestRunConfigurationType" factoryName="Dart Test" singleton="true" nameIsGenerated="true">
<option name="filePath" value="$PROJECT_DIR$/test/protect_cookie_test.dart" />
<option name="testRunnerOptions" value="-j4" />
<method />
</configuration>
</component>

View file

@ -1,4 +0,0 @@
language: dart
dart:
- dev
- stable

12
packages/auth/AUTHORS.md Normal file
View file

@ -0,0 +1,12 @@
Primary Authors
===============
* __[Thomas Hii](dukefirehawk.apps@gmail.com)__
Thomas is the current maintainer of the code base. He has refactored and migrated the
code base to support NNBD.
* __[Tobe O](thosakwe@gmail.com)__
Tobe has written much of the original code prior to NNBD migration. He has moved on and
is no longer involved with the project.

View file

@ -1,83 +1,193 @@
# 2.1.5+1
# Change Log
## 8.2.0
* Require Dart >= 3.3
* Updated `lints` to 4.0.0
## 8.1.1
* Updated repository link
## 8.1.0
* Updated `lints` to 3.0.0
## 8.0.0
* Require Dart >= 3.0
* Upgraded `http` to 1.0.0
* Fixed failed `successRedirect` test case
* Fixed failed `failureRedirect` test case
* Fixed failed `login` test case
* Fixed failed `force basic` test case
* Added `example1` and `example2`
## 7.0.1
* Fixed linter warnings
## 7.0.0
* Require Dart >= 2.17
## 6.0.0
* Require Dart >= 2.16
## 5.0.0
* Skipped release
## 4.1.2
* Fixed `requireAuthentication` to work correctly with null-safety type
## 4.1.1
* Changed `userId` field of `AuthToken` to String type
* Changed `serializer` return value to String type
* Changed `deserializer` input parameter to String type
## 4.1.0
* Updated linter to `package:lints`
## 4.0.5
* Added support for verifier function to return an empty Map instead of null
* Fixed `canRespondWithJson` option to return data in the response body when set to true
## 4.0.4
* Changed `serializer` and `deserializer` parameters to be required
* Fixed HTTP basic authentication
* All 31 unit tests passed
## 4.0.3
* Fixed "failureRedirect" unit test
## 4.0.2
* Added MirrorsReflector to unit test
## 4.0.1
* Updated README
## 4.0.0
* Migrated to support Dart >= 2.12 NNBD
## 3.0.0
* Migrated to work with Dart >= 2.12 Non NNBD
## 2.1.5+1
* Fix error in popup page.
# 2.1.5
## 2.1.5
* Modify `_apply` to honor an existing `User` over `Future<User>`.
# 2.1.4
## 2.1.4
* Deprecate `decodeJwt`, in favor of asynchronous injections.
# 2.1.3
## 2.1.3
* Use `await` on redirects, etc.
# 2.1.2
## 2.1.2
* Change empty cookie string to have double quotes (thanks @korsvanloon).
# 2.1.1
## 2.1.1
* Added `scopes` to `ExternalAuthOptions`.
# 2.1.0
## 2.1.0
* Added `ExternalAuthOptions`.
# 2.0.4
## 2.0.4
* `successRedirect` was previously explicitly returning a `200`; remove this and allow the default `302`.
# 2.0.3
## 2.0.3
* Updates for streaming parse of request bodies.
# 2.0.2
## 2.0.2
* Handle `null` return in `authenticate` + `failureRedirect`.
# 2.0.1
## 2.0.1
* Add generic parameter to `options` on `AuthStrategy.authenticate`.
# 2.0.0+1
## 2.0.0+1
* Meta update to improve Pub score.
# 2.0.0
* Made `AuthStrategy` generic.
* `AngelAuth.strategies` is now a `Map<String, AuthStrategy<User>>`.
* Removed `AuthStrategy.canLogout`.
* Made `AngelAuthTokenCallback` generic.
## 2.0.0
# 2.0.0-alpha
* Depend on Dart 2 and Angel 2.
* Made `AuthStrategy` generic.
* `ProtevusAuth.strategies` is now a `Map<String, AuthStrategy<User>>`.
* Removed `AuthStrategy.canLogout`.
* Made `ProtevusAuthTokenCallback` generic.
## 2.0.0-alpha
* Depend on Dart 2 and Protevus 2.
* Remove `dart2_constant`.
* Remove `requireAuth`.
* Remove `userKey`, instead favoring generic parameters.
# 1.2.0
## 1.2.0
* Deprecate `requireAuth`, in favor of `requireAuthentication`.
* Allow configuring of the `userKey`.
* Deprecate `middlewareName`.
# 1.1.1+6
## 1.1.1+6
* Fix a small logic bug that prevented `LocalAuthStrategy`
from correctly propagating the authenticated user when
using `Basic` auth.
# 1.1.1+5
## 1.1.1+5
* Prevent duplication of cookies.
* Regenerate the JWT if `tokenCallback` is called.
# 1.1.1+4
## 1.1.1+4
* Patched `logout` to properly erase cookies
* Fixed checking of expired tokens.
# 1.1.1+3
## 1.1.1+3
* `authenticate` returns the current user, if one is present.
# 1.1.1+2
## 1.1.1+2
* `_apply` now always sends a `token` cookie.
# 1.1.1+1
## 1.1.1+1
* Update `protectCookie` to only send `maxAge` when it is not `-1`.
# 1.1.1
## 1.1.1
* Added `protectCookie`, to better protect data sent in cookies.
# 1.1.0+2
## 1.1.0+2
* `LocalAuthStrategy` returns `true` on `Basic` authentication.
# 1.1.0+1
## 1.1.0+1
* Modified `LocalAuthStrategy`'s handling of `Basic` authentication.

View file

@ -1,21 +1,29 @@
The MIT License (MIT)
BSD 3-Clause License
Copyright (c) 2016 angel-dart
Copyright (c) 2021, dukefirehawk.com
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View file

@ -1,31 +1,33 @@
# angel_auth
# Protevus Anthentication
[![Pub](https://img.shields.io/pub/v/angel_auth.svg)](https://pub.dartlang.org/packages/angel_auth)
[![build status](https://travis-ci.org/angel-dart/auth.svg?branch=master)](https://travis-ci.org/angel-dart/auth)
![Pub Version (including pre-releases)](https://img.shields.io/pub/v/protevus_auth?include_prereleases)
[![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety)
[![Discord](https://img.shields.io/discord/1060322353214660698)](https://discord.gg/3X6bxTUdCM)
[![License](https://img.shields.io/github/license/dart-backend/protevus)](https://github.com/dart-backend/protevus/tree/master/packages/auth/LICENSE)
A complete authentication plugin for Angel. Inspired by Passport.
A complete authentication plugin for Protevus. Inspired by Passport. More details in the [User Guide](https://protevus-docs.dukefirehawk.com/guides/authentication).
# Wiki
[Click here](https://github.com/angel-dart/auth/wiki).
## Bundled Strategies
# Bundled Strategies
* Local (with and without Basic Auth)
* Find other strategies (Twitter, Google, OAuth2, etc.) on Pub!!!
* Find other strategies (Twitter, Google, OAuth2, etc.) on pub
# Example
Ensure you have read the [wiki](https://github.com/angel-dart/auth/wiki).
## Example
Ensure you have read the [User Guide](https://protevus-docs.dukefirehawk.com/guides/authentication).
```dart
configureServer(Angel app) async {
var auth = AngelAuth<User>();
auth.serializer = ...;
auth.deserializer = ...;
configureServer(Protevus app) async {
var auth = ProtevusAuth<User>(
serializer: (user) => user.id ?? '',
deserializer: (id) => fetchAUserByIdSomehow(id
);
auth.strategies['local'] = LocalAuthStrategy(...);
// POST route to handle username+password
app.post('/local', auth.authenticate('local'));
// Using Angel's asynchronous injections, we can parse the JWT
// Using Protevus's asynchronous injections, we can parse the JWT
// on demand. It won't be parsed until we check.
app.get('/profile', ioc((User user) {
print(user.description);
@ -48,17 +50,15 @@ configureServer(Angel app) async {
}
```
# Default Authentication Callback
A frequent use case within SPA's is opening OAuth login endpoints in a separate window.
[`angel_client`](https://github.com/angel-dart/client)
provides a facility for this, which works perfectly with the default callback provided
in this package.
## Default Authentication Callback
A frequent use case within SPA's is opening OAuth login endpoints in a separate window. [`protevus_client`](https://pub.dev/packages/protevus_client) provides a facility for this, which works perfectly with the default callback provided in this package.
```dart
configureServer(Angel app) async {
configureServer(Protevus app) async {
var handler = auth.authenticate(
'facebook',
AngelAuthOptions(callback: confirmPopupAuthentication()));
ProtevusAuthOptions(callback: confirmPopupAuthentication()));
app.get('/auth/facebook', handler);
// Use a comma to try multiple strategies!!!
@ -75,8 +75,7 @@ configureServer(Angel app) async {
}
```
This renders a simple HTML page that fires the user's JWT as a `token` event in `window.opener`.
`angel_client` [exposes this as a Stream](https://github.com/angel-dart/client#authentication):
This renders a simple HTML page that fires the user's JWT as a `token` event in `window.opener`. `protevus_client` [exposes this as a Stream](https://pub.dev/documentation/protevus_client/latest/):
```dart
app.authenticateViaPopup('/auth/google').listen((jwt) {

View file

@ -1,4 +1 @@
include: package:pedantic/analysis_options.yaml
analyzer:
strong-mode:
implicit-casts: false
include: package:lints/recommended.yaml

View file

@ -0,0 +1,22 @@
### Load landing page
GET http://localhost:3000/ HTTP/1.1
### login (call_back)
POST http://localhost:3000/login HTTP/1.1
Content-Type: application/json
Authorization: Basic jdoe1:password
### Success redirect (local)
POST http://localhost:3000/login HTTP/1.1
Content-Type: application/json
Authorization: Basic username:password
### Failure redirect (local)
POST http://localhost:3000/login HTTP/1.1
Content-Type: application/json
Authorization: Basic password:username
### Force basic
GET http://localhost:3000/hello HTTP/1.1
Content-Type: application/json
Accept:application/json

View file

@ -1,15 +1,13 @@
import 'dart:async';
import 'package:angel_auth/angel_auth.dart';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:protevus_auth/protevus_auth.dart';
import 'package:protevus_framework/protevus_framework.dart';
import 'package:protevus_framework/http.dart';
main() async {
var app = Angel();
var auth = AngelAuth<User>();
auth.serializer = (user) => user.id;
auth.deserializer = (id) => fetchAUserByIdSomehow(id);
void main() async {
var app = Protevus();
var auth = ProtevusAuth<User>(
serializer: (user) => user.id ?? '',
deserializer: (id) => fetchAUserByIdSomehow(id));
// Middleware to decode JWT's and inject a user object...
await app.configure(auth.configureServer);
@ -19,21 +17,22 @@ main() async {
// If authentication succeeds, return a User object.
//
// Otherwise, return `null`.
return null;
});
app.post('/auth/local', auth.authenticate('local'));
var http = AngelHttp(app);
var http = ProtevusHttp(app);
await http.startServer('127.0.0.1', 3000);
print('Listening at http://127.0.0.1:3000');
}
class User {
String id, username, password;
String? id, username, password;
}
Future<User> fetchAUserByIdSomehow(id) async {
Future<User> fetchAUserByIdSomehow(String id) async {
// Fetch a user somehow...
throw UnimplementedError();
}

View file

@ -0,0 +1,114 @@
import 'package:protevus_auth/protevus_auth.dart';
import 'package:protevus_container/mirrors.dart';
import 'package:protevus_framework/protevus_framework.dart';
import 'package:protevus_framework/http.dart';
import 'package:collection/collection.dart' show IterableExtension;
import 'package:io/ansi.dart';
import 'package:logging/logging.dart';
import 'package:collection/collection.dart';
class User extends Model {
String? username, password;
User({this.username, this.password});
static User parse(Map<String, dynamic> map) {
return User(
username: map['username'],
password: map['password'],
);
}
Map<String, dynamic> toJson() {
return {
'id': id,
'username': username,
'password': password,
'created_at': createdAt?.toIso8601String(),
'updated_at': updatedAt?.toIso8601String()
};
}
}
/*
* Backend for callback test cases
*/
void main() async {
hierarchicalLoggingEnabled = true;
Protevus app = Protevus(reflector: MirrorsReflector());
ProtevusHttp angelHttp = ProtevusHttp(app);
app.use('/users', MapService());
var oldErrorHandler = app.errorHandler;
app.errorHandler = (e, req, res) {
app.logger.severe(e.message, e, e.stackTrace ?? StackTrace.current);
return oldErrorHandler(e, req, res);
};
app.logger = Logger('protevus_auth')
..level = Level.FINEST
..onRecord.listen((rec) {
print(rec);
if (rec.error != null) {
print(yellow.wrap(rec.error.toString()));
}
if (rec.stackTrace != null) {
print(yellow.wrap(rec.stackTrace.toString()));
}
});
await app
.findService('users')
?.create({'username': 'jdoe1', 'password': 'password'});
var auth = ProtevusAuth<User>(
serializer: (u) => u.id ?? '',
deserializer: (id) async =>
await app.findService('users')?.read(id) as User);
//auth.serializer = (u) => u.id;
//auth.deserializer =
// (id) async => await app.findService('users')!.read(id) as User;
await app.configure(auth.configureServer);
auth.strategies['local'] = LocalAuthStrategy((username, password) async {
var users = await app
.findService('users')
?.index()
.then((it) => it.map<User>((m) => User.parse(m)).toList());
var result = users?.firstWhereOrNull(
(user) => user.username == username && user.password == password);
return Future.value(result);
}, allowBasic: true);
app.post(
'/login',
auth.authenticate('local',
ProtevusAuthOptions(callback: (req, res, token) {
res
..write('Hello!')
..close();
})));
app.get('/', (req, res) => res.write("Hello"));
app.chain([
(req, res) {
if (!req.container!.has<User>()) {
req.container!.registerSingleton<User>(
User(username: req.params['name']?.toString()));
}
return true;
}
]).post(
'/existing/:name',
auth.authenticate('local'),
);
await angelHttp.startServer('127.0.0.1', 3000);
}

View file

@ -0,0 +1,69 @@
import 'dart:async';
import 'package:protevus_auth/protevus_auth.dart';
import 'package:protevus_container/mirrors.dart';
import 'package:protevus_framework/protevus_framework.dart';
import 'package:protevus_framework/http.dart';
import 'package:logging/logging.dart';
final Map<String, String> sampleUser = {'hello': 'world'};
final ProtevusAuth<Map<String, String>> auth =
ProtevusAuth<Map<String, String>>(
serializer: (user) async => '1337',
deserializer: (id) async => sampleUser);
//var headers = <String, String>{'accept': 'application/json'};
var localOpts = ProtevusAuthOptions<Map<String, String>>(
failureRedirect: '/failure', successRedirect: '/success');
var localOpts2 =
ProtevusAuthOptions<Map<String, String>>(canRespondWithJson: false);
Future<Map<String, String>> verifier(String? username, String? password) async {
if (username == 'username' && password == 'password') {
return sampleUser;
} else {
return {};
}
}
Future wireAuth(Protevus app) async {
//auth.strategies['local'] = LocalAuthStrategy(verifier);
auth.strategies['local'] =
LocalAuthStrategy(verifier, forceBasic: true, realm: 'test');
await app.configure(auth.configureServer);
}
/*
* Backend for local test cases
*/
void main() async {
Protevus app = Protevus(reflector: MirrorsReflector());
ProtevusHttp angelHttp = ProtevusHttp(app, useZone: false);
await app.configure(wireAuth);
app.get('/hello', (req, res) {
// => 'Woo auth'
return 'Woo auth';
}, middleware: [auth.authenticate('local', localOpts2)]);
app.post('/login', (req, res) => 'This should not be shown',
middleware: [auth.authenticate('local', localOpts)]);
app.get('/success', (req, res) => 'yep', middleware: [
requireAuthentication<Map<String, String>>(),
]);
app.get('/failure', (req, res) => 'nope');
app.logger = Logger('local_test')
..onRecord.listen((rec) {
print(
'${rec.time}: ${rec.level.name}: ${rec.loggerName}: ${rec.message}');
if (rec.error != null) {
print(rec.error);
print(rec.stackTrace);
}
});
await angelHttp.startServer('127.0.0.1', 3000);
}

View file

@ -1,4 +1,4 @@
/// Stand-alone JWT library.
library angel_auth.auth_token;
library protevus_auth.auth_token;
export 'src/auth_token.dart';

View file

@ -1,4 +1,4 @@
library angel_auth;
library protevus_auth;
export 'src/middleware/require_auth.dart';
export 'src/strategies/strategies.dart';

View file

@ -1,7 +1,8 @@
import 'dart:collection';
import 'package:angel_framework/angel_framework.dart';
import 'package:protevus_framework/protevus_framework.dart';
import 'dart:convert';
import 'package:crypto/crypto.dart';
import 'package:logging/logging.dart';
/// Calls [BASE64URL], but also works for strings with lengths
/// that are *not* multiples of 4.
@ -25,88 +26,100 @@ String decodeBase64(String str) {
}
class AuthToken {
final SplayTreeMap<String, String> _header =
SplayTreeMap.from({"alg": "HS256", "typ": "JWT"});
static final _log = Logger('AuthToken');
String ipAddress;
DateTime issuedAt;
final SplayTreeMap<String, String> _header =
SplayTreeMap.from({'alg': 'HS256', 'typ': 'JWT'});
String? ipAddress;
num lifeSpan;
var userId;
String userId;
late DateTime issuedAt;
Map<String, dynamic> payload = {};
AuthToken(
{this.ipAddress,
this.lifeSpan = -1,
this.userId,
DateTime issuedAt,
Map payload = const {}}) {
required this.userId,
DateTime? issuedAt,
Map<String, dynamic>? payload}) {
this.issuedAt = issuedAt ?? DateTime.now();
this.payload.addAll(
payload?.keys?.fold({}, (out, k) => out..[k.toString()] = payload[k]) ??
{});
if (payload != null) {
this.payload.addAll(payload.keys
.fold({}, ((out, k) => out?..[k.toString()] = payload[k])) ??
{});
}
}
factory AuthToken.fromJson(String jsons) =>
AuthToken.fromMap(json.decode(jsons) as Map);
AuthToken.fromMap(json.decode(jsons) as Map<String, dynamic>);
factory AuthToken.fromMap(Map data) {
factory AuthToken.fromMap(Map<String, dynamic> data) {
return AuthToken(
ipAddress: data["aud"].toString(),
lifeSpan: data["exp"] as num,
issuedAt: DateTime.parse(data["iat"].toString()),
userId: data["sub"],
payload: data["pld"] as Map ?? {});
ipAddress: data['aud'].toString(),
lifeSpan: data['exp'] as num,
issuedAt: DateTime.parse(data['iat'].toString()),
userId: data['sub'],
payload: data['pld']);
}
factory AuthToken.parse(String jwt) {
var split = jwt.split(".");
var split = jwt.split('.');
if (split.length != 3)
throw AngelHttpException.notAuthenticated(message: "Invalid JWT.");
if (split.length != 3) {
_log.warning('Invalid JWT');
throw ProtevusHttpException.notAuthenticated(message: 'Invalid JWT.');
}
var payloadString = decodeBase64(split[1]);
return AuthToken.fromMap(json.decode(payloadString) as Map);
return AuthToken.fromMap(
json.decode(payloadString) as Map<String, dynamic>);
}
factory AuthToken.validate(String jwt, Hmac hmac) {
var split = jwt.split(".");
var split = jwt.split('.');
if (split.length != 3)
throw AngelHttpException.notAuthenticated(message: "Invalid JWT.");
if (split.length != 3) {
_log.warning('Invalid JWT');
throw ProtevusHttpException.notAuthenticated(message: 'Invalid JWT.');
}
// var headerString = decodeBase64(split[0]);
var payloadString = decodeBase64(split[1]);
var data = split[0] + "." + split[1];
var data = '${split[0]}.${split[1]}';
var signature = base64Url.encode(hmac.convert(data.codeUnits).bytes);
if (signature != split[2])
throw AngelHttpException.notAuthenticated(
message: "JWT payload does not match hashed version.");
if (signature != split[2]) {
_log.warning('JWT payload does not match hashed version');
throw ProtevusHttpException.notAuthenticated(
message: 'JWT payload does not match hashed version.');
}
return AuthToken.fromMap(json.decode(payloadString) as Map);
return AuthToken.fromMap(
json.decode(payloadString) as Map<String, dynamic>);
}
String serialize(Hmac hmac) {
var headerString = base64Url.encode(json.encode(_header).codeUnits);
var payloadString = base64Url.encode(json.encode(toJson()).codeUnits);
var data = headerString + "." + payloadString;
var data = '$headerString.$payloadString';
var signature = hmac.convert(data.codeUnits).bytes;
return data + "." + base64Url.encode(signature);
return '$data.${base64Url.encode(signature)}';
}
Map toJson() {
Map<String, dynamic> toJson() {
return _splayify({
"iss": "angel_auth",
"aud": ipAddress,
"exp": lifeSpan,
"iat": issuedAt.toIso8601String(),
"sub": userId,
"pld": _splayify(payload)
'iss': 'angel_auth',
'aud': ipAddress,
'exp': lifeSpan,
'iat': issuedAt.toIso8601String(),
'sub': userId,
'pld': _splayify(payload)
});
}
}
SplayTreeMap _splayify(Map map) {
Map<String, dynamic> _splayify(Map<String, dynamic> map) {
var data = {};
map.forEach((k, v) {
data[k] = _splay(v);
@ -114,11 +127,12 @@ SplayTreeMap _splayify(Map map) {
return SplayTreeMap.from(data);
}
_splay(value) {
dynamic _splay(dynamic value) {
if (value is Iterable) {
return value.map(_splay).toList();
} else if (value is Map)
return _splayify(value);
else
} else if (value is Map) {
return _splayify(value as Map<String, dynamic>);
} else {
return value;
}
}

View file

@ -1,10 +1,12 @@
import 'package:charcode/ascii.dart';
import 'package:collection/collection.dart';
import 'package:meta/meta.dart';
import 'package:quiver_hashcode/hashcode.dart';
import 'package:quiver/core.dart';
import 'package:logging/logging.dart';
/// A common class containing parsing and validation logic for third-party authentication configuration.
class ExternalAuthOptions {
static final _log = Logger('VirtualDirectory');
/// The user's identifier, otherwise known as an "application id".
final String clientId;
@ -18,18 +20,12 @@ class ExternalAuthOptions {
final Set<String> scopes;
ExternalAuthOptions._(
this.clientId, this.clientSecret, this.redirectUri, this.scopes) {
if (clientId == null) {
throw ArgumentError.notNull('clientId');
} else if (clientSecret == null) {
throw ArgumentError.notNull('clientSecret');
}
}
this.clientId, this.clientSecret, this.redirectUri, this.scopes);
factory ExternalAuthOptions(
{@required String clientId,
@required String clientSecret,
@required redirectUri,
{required String clientId,
required String clientSecret,
required redirectUri,
Iterable<String> scopes = const []}) {
if (redirectUri is String) {
return ExternalAuthOptions._(
@ -38,6 +34,7 @@ class ExternalAuthOptions {
return ExternalAuthOptions._(
clientId, clientSecret, redirectUri, scopes.toSet());
} else {
_log.severe('RedirectUri is not valid');
throw ArgumentError.value(
redirectUri, 'redirectUri', 'must be a String or Uri');
}
@ -49,10 +46,17 @@ class ExternalAuthOptions {
/// * `client_id`
/// * `client_secret`
/// * `redirect_uri`
factory ExternalAuthOptions.fromMap(Map map) {
factory ExternalAuthOptions.fromMap(Map<String, dynamic> map) {
var clientId = map['client_id'];
var clientSecret = map['client_secret'];
if (clientId == null || clientSecret == null) {
_log.severe('clientId or clientSecret is null');
throw ArgumentError('Invalid clientId and/or clientSecret');
}
return ExternalAuthOptions(
clientId: map['client_id'] as String,
clientSecret: map['client_secret'] as String,
clientId: clientId,
clientSecret: clientSecret,
redirectUri: map['redirect_uri'],
scopes: map['scopes'] is Iterable
? ((map['scopes'] as Iterable).map((x) => x.toString()))
@ -73,15 +77,15 @@ class ExternalAuthOptions {
/// Creates a copy of this object, with the specified changes.
ExternalAuthOptions copyWith(
{String clientId,
String clientSecret,
{String? clientId,
String? clientSecret,
redirectUri,
Iterable<String> scopes}) {
Iterable<String> scopes = const []}) {
return ExternalAuthOptions(
clientId: clientId ?? this.clientId,
clientSecret: clientSecret ?? this.clientSecret,
redirectUri: redirectUri ?? this.redirectUri,
scopes: (scopes ??= []).followedBy(this.scopes),
scopes: (scopes).followedBy(this.scopes),
);
}
@ -111,8 +115,8 @@ class ExternalAuthOptions {
/// If no [asteriskCount] is given, then the number of asterisks will equal the length of
/// the actual [clientSecret].
@override
String toString({bool obscureSecret = true, int asteriskCount}) {
String secret;
String toString({bool obscureSecret = true, int? asteriskCount}) {
String? secret;
if (!obscureSecret) {
secret = clientSecret;

View file

@ -1,20 +1,23 @@
import 'dart:async';
import 'package:angel_framework/angel_framework.dart';
import 'package:protevus_framework/protevus_framework.dart';
/// Forces Basic authentication over the requested resource, with the given [realm] name, if no JWT is present.
///
/// [realm] defaults to `'angel_auth'`.
RequestHandler forceBasicAuth<User>({String realm}) {
/// [realm] defaults to `'protevus_auth'`.
RequestHandler forceBasicAuth<User>({String? realm}) {
return (RequestContext req, ResponseContext res) async {
if (req.container.has<User>())
return true;
else if (req.container.has<Future<User>>()) {
await req.container.makeAsync<User>();
return true;
if (req.container != null) {
var reqContainer = req.container!;
if (reqContainer.has<User>()) {
return true;
} else if (reqContainer.has<Future<User>>()) {
await reqContainer.makeAsync<User>();
return true;
}
}
res.headers['www-authenticate'] = 'Basic realm="${realm ?? 'angel_auth'}"';
throw AngelHttpException.notAuthenticated();
throw ProtevusHttpException.notAuthenticated();
};
}
@ -22,20 +25,27 @@ RequestHandler forceBasicAuth<User>({String realm}) {
RequestHandler requireAuthentication<User>() {
return (RequestContext req, ResponseContext res,
{bool throwError = true}) async {
bool _reject(ResponseContext res) {
bool reject(ResponseContext res) {
if (throwError) {
res.statusCode = 403;
throw AngelHttpException.forbidden();
} else
throw ProtevusHttpException.forbidden();
} else {
return false;
}
}
if (req.container.has<User>() || req.method == 'OPTIONS')
return true;
else if (req.container.has<Future<User>>()) {
await req.container.makeAsync<User>();
return true;
} else
return _reject(res);
if (req.container != null) {
var reqContainer = req.container!;
if (reqContainer.has<User>() || req.method == 'OPTIONS') {
return true;
} else if (reqContainer.has<Future<User>>()) {
await reqContainer.makeAsync<User>();
return true;
} else {
return reject(res);
}
} else {
return reject(res);
}
};
}

View file

@ -1,19 +1,19 @@
import 'dart:async';
import 'package:angel_framework/angel_framework.dart';
import 'package:protevus_framework/protevus_framework.dart';
import 'auth_token.dart';
typedef FutureOr AngelAuthCallback(
typedef ProtevusAuthCallback = FutureOr Function(
RequestContext req, ResponseContext res, String token);
typedef FutureOr AngelAuthTokenCallback<User>(
typedef ProtevusAuthTokenCallback<User> = FutureOr Function(
RequestContext req, ResponseContext res, AuthToken token, User user);
class AngelAuthOptions<User> {
AngelAuthCallback callback;
AngelAuthTokenCallback<User> tokenCallback;
String successRedirect;
String failureRedirect;
class ProtevusAuthOptions<User> {
ProtevusAuthCallback? callback;
ProtevusAuthTokenCallback<User>? tokenCallback;
String? successRedirect;
String? failureRedirect;
/// If `false` (default: `true`), then successful authentication will return `true` and allow the
/// execution of subsequent handlers, just like any other middleware.
@ -21,10 +21,10 @@ class AngelAuthOptions<User> {
/// Works well with `Basic` authentication.
bool canRespondWithJson;
AngelAuthOptions(
ProtevusAuthOptions(
{this.callback,
this.tokenCallback,
this.canRespondWithJson = true,
this.successRedirect,
String this.failureRedirect});
this.failureRedirect});
}

View file

@ -1,20 +1,24 @@
import 'dart:async';
import 'dart:io';
import 'dart:math' as Math;
import 'package:angel_framework/angel_framework.dart';
import 'dart:math';
import 'package:protevus_framework/protevus_framework.dart';
import 'package:crypto/crypto.dart';
import 'package:logging/logging.dart';
import 'auth_token.dart';
import 'options.dart';
import 'strategy.dart';
/// Handles authentication within an Angel application.
class AngelAuth<User> {
Hmac _hs256;
int _jwtLifeSpan;
/// Handles authentication within an Protevus application.
class ProtevusAuth<User> {
final _log = Logger('ProtevusAuth');
late Hmac _hs256;
late int _jwtLifeSpan;
final StreamController<User> _onLogin = StreamController<User>(),
_onLogout = StreamController<User>();
Math.Random _random = Math.Random.secure();
final RegExp _rgxBearer = RegExp(r"^Bearer");
final Random _random = Random.secure();
final RegExp _rgxBearer = RegExp(r'^Bearer');
/// If `true` (default), then JWT's will be stored and retrieved from a `token` cookie.
final bool allowCookie;
@ -29,7 +33,7 @@ class AngelAuth<User> {
/// A domain to restrict emitted cookies to.
///
/// Only applies if [allowCookie] is `true`.
final String cookieDomain;
final String? cookieDomain;
/// A path to restrict emitted cookies to.
///
@ -48,10 +52,10 @@ class AngelAuth<User> {
Map<String, AuthStrategy<User>> strategies = {};
/// Serializes a user into a unique identifier associated only with one identity.
FutureOr Function(User) serializer;
FutureOr<String> Function(User) serializer;
/// Deserializes a unique identifier into its associated identity. In most cases, this is a user object or model instance.
FutureOr<User> Function(Object) deserializer;
FutureOr<User> Function(String) deserializer;
/// Fires the result of [deserializer] whenever a user signs in to the application.
Stream<User> get onLogin => _onLogin.stream;
@ -65,71 +69,89 @@ class AngelAuth<User> {
String _randomString(
{int length = 32,
String validChars =
"ABCDEFHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_"}) {
'ABCDEFHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_'}) {
var chars = <int>[];
while (chars.length < length) chars.add(_random.nextInt(validChars.length));
while (chars.length < length) {
chars.add(_random.nextInt(validChars.length));
}
return String.fromCharCodes(chars);
}
/// `jwtLifeSpan` - should be in *milliseconds*.
AngelAuth(
{String jwtKey,
this.serializer,
this.deserializer,
num jwtLifeSpan,
ProtevusAuth(
{String? jwtKey,
required this.serializer,
required this.deserializer,
num jwtLifeSpan = -1,
this.allowCookie = true,
this.allowTokenInQuery = true,
this.enforceIp = true,
this.cookieDomain,
this.cookiePath = '/',
this.secureCookies = true,
this.reviveTokenEndpoint = "/auth/token"})
this.reviveTokenEndpoint = '/auth/token'})
: super() {
_hs256 = Hmac(sha256, (jwtKey ?? _randomString()).codeUnits);
_jwtLifeSpan = jwtLifeSpan?.toInt() ?? -1;
_jwtLifeSpan = jwtLifeSpan.toInt();
}
/// Configures an Angel server to decode and validate JSON Web tokens on demand,
/// Configures an Protevus server to decode and validate JSON Web tokens on demand,
/// whenever an instance of [User] is injected.
Future<void> configureServer(Angel app) async {
if (serializer == null)
Future<void> configureServer(Protevus app) async {
/*
if (serializer == null) {
throw StateError(
'An `AngelAuth` plug-in was called without its `serializer` being set. All authentication will fail.');
if (deserializer == null)
'An `ProtevusAuth` plug-in was called without its `serializer` being set. All authentication will fail.');
}
if (deserializer == null) {
throw StateError(
'An `AngelAuth` plug-in was called without its `deserializer` being set. All authentication will fail.');
'An `ProtevusAuth` plug-in was called without its `deserializer` being set. All authentication will fail.');
}
if (app.container == null) {
_log.severe('Protevus container is null');
throw StateError(
'Protevus.container is null. All authentication will fail.');
}
*/
var appContainer = app.container;
app.container.registerSingleton(this);
if (runtimeType != AngelAuth)
app.container.registerSingleton(this, as: AngelAuth);
appContainer.registerSingleton(this);
if (runtimeType != ProtevusAuth) {
appContainer.registerSingleton(this, as: ProtevusAuth);
}
if (!app.container.has<_AuthResult<User>>()) {
app.container
if (!appContainer.has<_AuthResult<User>>()) {
appContainer
.registerLazySingleton<Future<_AuthResult<User>>>((container) async {
var req = container.make<RequestContext>();
var res = container.make<ResponseContext>();
//if (req == null || res == null) {
// _log.warning('RequestContext or responseContext is null');
// throw ProtevusHttpException.forbidden();
//}
var result = await _decodeJwt(req, res);
if (result != null) {
return result;
} else {
throw AngelHttpException.forbidden();
_log.warning('JWT is null');
throw ProtevusHttpException.forbidden();
}
});
app.container.registerLazySingleton<Future<User>>((container) async {
appContainer.registerLazySingleton<Future<User>>((container) async {
var result = await container.makeAsync<_AuthResult<User>>();
return result.user;
});
app.container.registerLazySingleton<Future<AuthToken>>((container) async {
appContainer.registerLazySingleton<Future<AuthToken>>((container) async {
var result = await container.makeAsync<_AuthResult<User>>();
return result.token;
});
}
if (reviveTokenEndpoint != null) {
app.post(reviveTokenEndpoint, reviveJwt);
}
app.post(reviveTokenEndpoint, _reviveJwt);
app.shutdownHooks.add((_) {
_onLogin.close();
@ -138,15 +160,22 @@ class AngelAuth<User> {
void _apply(
RequestContext req, ResponseContext res, AuthToken token, User user) {
if (!req.container.has<User>()) {
req.container.registerSingleton<User>(user);
if (req.container == null) {
_log.severe('RequestContext.container is null');
throw StateError(
'RequestContext.container is not set. All authentication will fail.');
}
if (!req.container.has<AuthToken>()) {
req.container.registerSingleton<AuthToken>(token);
var reqContainer = req.container!;
if (!reqContainer.has<User>()) {
reqContainer.registerSingleton<User>(user);
}
if (allowCookie == true) {
if (!reqContainer.has<AuthToken>()) {
reqContainer.registerSingleton<AuthToken>(token);
}
if (allowCookie) {
_addProtectedCookie(res, 'token', token.serialize(_hs256));
}
}
@ -155,10 +184,10 @@ class AngelAuth<User> {
///
/// Now that `package:angel_framework` supports asynchronous injections, this middleware
/// is no longer directly necessary. Instead, call [configureServer]. You can then use
/// `makeAsync<User>`, or Angel's injections directly:
/// `makeAsync<User>`, or Protevus's injections directly:
///
/// ```dart
/// var auth = AngelAuth<User>(...);
/// var auth = ProtevusAuth<User>(...);
/// await app.configure(auth.configureServer);
///
/// app.get('/hmm', (User user) async {
@ -172,35 +201,41 @@ class AngelAuth<User> {
/// String getUsername(User user) => user.name
/// }
/// ```
/*
@deprecated
Future decodeJwt(RequestContext req, ResponseContext res) async {
if (req.method == "POST" && req.path == reviveTokenEndpoint) {
return await reviveJwt(req, res);
if (req.method == 'POST' && req.path == reviveTokenEndpoint) {
return await _reviveJwt(req, res);
} else {
await _decodeJwt(req, res);
return true;
}
}
*/
Future<_AuthResult<User>> _decodeJwt(
Future<_AuthResult<User>?> _decodeJwt(
RequestContext req, ResponseContext res) async {
String jwt = getJwt(req);
var jwt = getJwt(req);
if (jwt != null) {
var token = AuthToken.validate(jwt, _hs256);
if (enforceIp) {
if (req.ip != null && req.ip != token.ipAddress)
throw AngelHttpException.forbidden(
message: "JWT cannot be accessed from this IP address.");
if (req.ip != token.ipAddress) {
_log.warning('JWT cannot be accessed from this IP address');
throw ProtevusHttpException.forbidden(
message: 'JWT cannot be accessed from this IP address.');
}
}
if (token.lifeSpan > -1) {
var expiry =
token.issuedAt.add(Duration(milliseconds: token.lifeSpan.toInt()));
if (!expiry.isAfter(DateTime.now()))
throw AngelHttpException.forbidden(message: "Expired JWT.");
if (!expiry.isAfter(DateTime.now())) {
_log.warning('Expired JWT');
throw ProtevusHttpException.forbidden(message: 'Expired JWT.');
}
}
var user = await deserializer(token.userId);
@ -212,19 +247,25 @@ class AngelAuth<User> {
}
/// Retrieves a JWT from a request, if any was sent at all.
String getJwt(RequestContext req) {
if (req.headers.value("Authorization") != null) {
final authHeader = req.headers.value("Authorization");
String? getJwt(RequestContext req) {
if (req.headers?.value('Authorization') != null) {
final authHeader = req.headers?.value('Authorization');
if (authHeader != null) {
// Allow Basic auth to fall through
if (_rgxBearer.hasMatch(authHeader)) {
return authHeader.replaceAll(_rgxBearer, '').trim();
}
}
// Allow Basic auth to fall through
if (_rgxBearer.hasMatch(authHeader))
return authHeader.replaceAll(_rgxBearer, "").trim();
_log.info('RequestContext.headers is null');
} else if (allowCookie &&
req.cookies.any((cookie) => cookie.name == "token")) {
return req.cookies.firstWhere((cookie) => cookie.name == "token").value;
} else if (allowTokenInQuery &&
req.uri.queryParameters['token'] is String) {
return req.uri.queryParameters['token']?.toString();
req.cookies.any((cookie) => cookie.name == 'token')) {
return req.cookies.firstWhere((cookie) => cookie.name == 'token').value;
} else if (allowTokenInQuery) {
//&& req.uri?.queryParameters['token'] is String) {
if (req.uri != null) {
return req.uri?.queryParameters['token']?.toString();
}
}
return null;
@ -243,10 +284,10 @@ class AngelAuth<User> {
cookie.secure = true;
}
if (_jwtLifeSpan > 0) {
cookie.maxAge ??= _jwtLifeSpan < 0 ? -1 : _jwtLifeSpan ~/ 1000;
cookie.expires ??=
DateTime.now().add(Duration(milliseconds: _jwtLifeSpan));
var lifeSpan = _jwtLifeSpan;
if (lifeSpan > 0) {
cookie.maxAge ??= lifeSpan < 0 ? -1 : lifeSpan ~/ 1000;
cookie.expires ??= DateTime.now().add(Duration(milliseconds: lifeSpan));
}
cookie.domain ??= cookieDomain;
@ -255,7 +296,7 @@ class AngelAuth<User> {
}
/// Attempts to revive an expired (or still alive) JWT.
Future<Map<String, dynamic>> reviveJwt(
Future<Map<String, dynamic>> _reviveJwt(
RequestContext req, ResponseContext res) async {
try {
var jwt = getJwt(req);
@ -264,14 +305,18 @@ class AngelAuth<User> {
var body = await req.parseBody().then((_) => req.bodyAsMap);
jwt = body['token']?.toString();
}
if (jwt == null) {
throw AngelHttpException.forbidden(message: "No JWT provided");
_log.warning('No JWT provided');
throw ProtevusHttpException.forbidden(message: 'No JWT provided');
} else {
var token = AuthToken.validate(jwt, _hs256);
if (enforceIp) {
if (req.ip != token.ipAddress)
throw AngelHttpException.forbidden(
message: "JWT cannot be accessed from this IP address.");
if (req.ip != token.ipAddress) {
_log.warning('WT cannot be accessed from this IP address');
throw ProtevusHttpException.forbidden(
message: 'JWT cannot be accessed from this IP address.');
}
}
if (token.lifeSpan > -1) {
@ -294,8 +339,11 @@ class AngelAuth<User> {
return {'data': data, 'token': token.serialize(_hs256)};
}
} catch (e) {
if (e is AngelHttpException) rethrow;
throw AngelHttpException.badRequest(message: "Malformed JWT");
if (e is ProtevusHttpException) {
rethrow;
}
_log.warning('Malformed JWT');
throw ProtevusHttpException.badRequest(message: 'Malformed JWT');
}
}
@ -307,14 +355,17 @@ class AngelAuth<User> {
/// or a `401 Not Authenticated` is thrown, if it is the last one.
///
/// Any other result is considered an authenticated user, and terminates the loop.
RequestHandler authenticate(type, [AngelAuthOptions<User> options]) {
RequestHandler authenticate(type, [ProtevusAuthOptions<User>? opt]) {
return (RequestContext req, ResponseContext res) async {
List<String> names = [];
var authOption = opt ?? ProtevusAuthOptions<User>();
var names = <String>[];
var arr = type is Iterable
? type.map((x) => x.toString()).toList()
: [type.toString()];
for (String t in arr) {
for (var t in arr) {
var n = t
.split(',')
.map((s) => s.trim())
@ -323,19 +374,30 @@ class AngelAuth<User> {
names.addAll(n);
}
for (int i = 0; i < names.length; i++) {
for (var i = 0; i < names.length; i++) {
var name = names[i];
var strategy = strategies[name] ??=
throw ArgumentError('No strategy "$name" found.');
var strategy = strategies[name];
if (strategy == null) {
_log.severe('No strategy "$name" found.');
throw ArgumentError('No strategy "$name" found.');
}
var hasExisting = req.container.has<User>();
var reqContainer = req.container;
if (reqContainer == null) {
print('req.container is null');
}
var hasExisting = reqContainer?.has<User>() ?? false;
var result = hasExisting
? req.container.make<User>()
: await strategy.authenticate(req, res, options);
if (result == true)
? reqContainer?.make<User>()
: await strategy.authenticate(req, res, authOption);
if (result == true) {
return result;
else if (result != false && result != null) {
} else if (result != null && result != false) {
//} else if (result != null && result is Map && result.isNotEmpty) {
var userId = await serializer(result);
// Create JWT
@ -343,12 +405,13 @@ class AngelAuth<User> {
userId: userId, lifeSpan: _jwtLifeSpan, ipAddress: req.ip);
var jwt = token.serialize(_hs256);
if (options?.tokenCallback != null) {
if (!req.container.has<User>()) {
req.container.registerSingleton<User>(result);
if (authOption.tokenCallback != null) {
var hasUser = reqContainer?.has<User>() ?? false;
if (!hasUser) {
reqContainer?.registerSingleton<User>(result);
}
var r = await options.tokenCallback(req, res, token, result);
var r = await authOption.tokenCallback!(req, res, token, result);
if (r != null) return r;
jwt = token.serialize(_hs256);
}
@ -359,20 +422,21 @@ class AngelAuth<User> {
_addProtectedCookie(res, 'token', jwt);
}
if (options?.callback != null) {
return await options.callback(req, res, jwt);
// Options is not null
if (authOption.callback != null) {
return await authOption.callback!(req, res, jwt);
}
if (options?.successRedirect?.isNotEmpty == true) {
await res.redirect(options.successRedirect);
if (authOption.successRedirect?.isNotEmpty == true) {
await res.redirect(authOption.successRedirect);
return false;
} else if (options?.canRespondWithJson != false &&
} else if (authOption.canRespondWithJson &&
req.accepts('application/json')) {
var user = hasExisting
? result
: await deserializer(await serializer(result));
_onLogin.add(user);
return {"data": user, "token": jwt};
return {'data': user, 'token': jwt};
}
return true;
@ -381,13 +445,15 @@ class AngelAuth<User> {
// Check if not redirect
if (res.statusCode == 301 ||
res.statusCode == 302 ||
res.headers.containsKey('location'))
res.headers.containsKey('location')) {
return false;
else if (options?.failureRedirect != null) {
await res.redirect(options.failureRedirect);
} else if (authOption.failureRedirect != null) {
await res.redirect(authOption.failureRedirect);
return false;
} else
throw AngelHttpException.notAuthenticated();
} else {
_log.warning('Not authenticated');
throw ProtevusHttpException.notAuthenticated();
}
}
}
};
@ -405,7 +471,8 @@ class AngelAuth<User> {
}
/// Log a user in on-demand.
Future loginById(userId, RequestContext req, ResponseContext res) async {
Future loginById(
String userId, RequestContext req, ResponseContext res) async {
var user = await deserializer(userId);
var token =
AuthToken(userId: userId, lifeSpan: _jwtLifeSpan, ipAddress: req.ip);
@ -418,21 +485,23 @@ class AngelAuth<User> {
}
/// Log an authenticated user out.
RequestHandler logout([AngelAuthOptions<User> options]) {
RequestHandler logout([ProtevusAuthOptions<User>? options]) {
return (RequestContext req, ResponseContext res) async {
if (req.container.has<User>()) {
var user = req.container.make<User>();
_onLogout.add(user);
if (req.container?.has<User>() == true) {
var user = req.container?.make<User>();
if (user != null) {
_onLogout.add(user);
}
}
if (allowCookie == true) {
res.cookies.removeWhere((cookie) => cookie.name == "token");
res.cookies.removeWhere((cookie) => cookie.name == 'token');
_addProtectedCookie(res, 'token', '""');
}
if (options != null &&
options.successRedirect != null &&
options.successRedirect.isNotEmpty) {
options.successRedirect!.isNotEmpty) {
await res.redirect(options.successRedirect);
}

View file

@ -1,10 +1,10 @@
import 'dart:convert';
import 'package:angel_framework/angel_framework.dart';
import 'package:protevus_framework/protevus_framework.dart';
import 'package:http_parser/http_parser.dart';
import 'options.dart';
/// Displays a default callback page to confirm authentication via popups.
AngelAuthCallback confirmPopupAuthentication({String eventName = 'token'}) {
ProtevusAuthCallback confirmPopupAuthentication({String eventName = 'token'}) {
return (req, ResponseContext res, String jwt) {
var evt = json.encode(eventName);
var detail = json.encode({'detail': jwt});

View file

@ -1,18 +1,20 @@
import 'dart:async';
import 'dart:convert';
import 'package:angel_framework/angel_framework.dart';
import 'package:logging/logging.dart';
import 'package:protevus_framework/protevus_framework.dart';
import '../options.dart';
import '../strategy.dart';
bool _validateString(String str) => str != null && str.isNotEmpty;
/// Determines the validity of an incoming username and password.
typedef FutureOr<User> LocalAuthVerifier<User>(
String username, String password);
// typedef FutureOr<User> LocalAuthVerifier<User>(String? username, String? password);
typedef LocalAuthVerifier<User> = FutureOr<User?> Function(
String? username, String? password);
class LocalAuthStrategy<User> extends AuthStrategy<User> {
RegExp _rgxBasic = RegExp(r'^Basic (.+)$', caseSensitive: false);
RegExp _rgxUsrPass = RegExp(r'^([^:]+):(.+)$');
final _log = Logger('LocalAuthStrategy');
final RegExp _rgxBasic = RegExp(r'^Basic (.+)$', caseSensitive: false);
final RegExp _rgxUsrPass = RegExp(r'^([^:]+):(.+)$');
LocalAuthVerifier<User> verifier;
String usernameField;
@ -23,35 +25,40 @@ class LocalAuthStrategy<User> extends AuthStrategy<User> {
String realm;
LocalAuthStrategy(this.verifier,
{String this.usernameField = 'username',
String this.passwordField = 'password',
String this.invalidMessage =
'Please provide a valid username and password.',
bool this.allowBasic = true,
bool this.forceBasic = false,
String this.realm = 'Authentication is required.'});
{this.usernameField = 'username',
this.passwordField = 'password',
this.invalidMessage = 'Please provide a valid username and password.',
this.allowBasic = false,
this.forceBasic = false,
this.realm = 'Authentication is required.'}) {
_log.info('Using LocalAuthStrategy');
}
@override
Future<User> authenticate(RequestContext req, ResponseContext res,
[AngelAuthOptions options_]) async {
AngelAuthOptions options = options_ ?? AngelAuthOptions();
User verificationResult;
Future<User?> authenticate(RequestContext req, ResponseContext res,
[ProtevusAuthOptions? options]) async {
var localOptions = options ?? ProtevusAuthOptions();
User? verificationResult;
if (allowBasic) {
String authHeader = req.headers.value('authorization') ?? "";
var authHeader = req.headers?.value('authorization') ?? '';
if (_rgxBasic.hasMatch(authHeader)) {
String base64AuthString = _rgxBasic.firstMatch(authHeader).group(1);
String authString =
String.fromCharCodes(base64.decode(base64AuthString));
var base64AuthString = _rgxBasic.firstMatch(authHeader)?.group(1);
if (base64AuthString == null) {
return null;
}
var authString = String.fromCharCodes(base64.decode(base64AuthString));
if (_rgxUsrPass.hasMatch(authString)) {
Match usrPassMatch = _rgxUsrPass.firstMatch(authString);
Match usrPassMatch = _rgxUsrPass.firstMatch(authString)!;
verificationResult =
await verifier(usrPassMatch.group(1), usrPassMatch.group(2));
} else
throw AngelHttpException.badRequest(errors: [invalidMessage]);
} else {
_log.warning('Bad request: $invalidMessage');
throw ProtevusHttpException.badRequest(errors: [invalidMessage]);
}
if (verificationResult == false || verificationResult == null) {
if (verificationResult == null) {
res
..statusCode = 401
..headers['www-authenticate'] = 'Basic realm="$realm"';
@ -59,11 +66,10 @@ class LocalAuthStrategy<User> extends AuthStrategy<User> {
return null;
}
return verificationResult;
//Allow non-null to pass through
//return verificationResult;
}
}
if (verificationResult == null) {
} else {
var body = await req
.parseBody()
.then((_) => req.bodyAsMap)
@ -75,23 +81,58 @@ class LocalAuthStrategy<User> extends AuthStrategy<User> {
}
}
if (verificationResult == false || verificationResult == null) {
if (options.failureRedirect != null &&
options.failureRedirect.isNotEmpty) {
await res.redirect(options.failureRedirect, code: 401);
// User authentication succeeded can return Map(one element), User(non null) or true
if (verificationResult != null && verificationResult != false) {
if (verificationResult is Map && verificationResult.isNotEmpty) {
return verificationResult;
} else if (verificationResult is! Map) {
return verificationResult;
}
}
// Force basic if set
if (forceBasic) {
//res.headers['www-authenticate'] = 'Basic realm="$realm"';
res
..statusCode = 401
..headers['www-authenticate'] = 'Basic realm="$realm"';
await res.close();
return null;
}
// Redirect failed authentication
if (localOptions.failureRedirect != null &&
localOptions.failureRedirect!.isNotEmpty) {
await res.redirect(localOptions.failureRedirect, code: 401);
return null;
}
_log.info('Not authenticated');
throw ProtevusHttpException.notAuthenticated();
/*
if (verificationResult is Map && verificationResult.isEmpty) {
if (localOptions.failureRedirect != null &&
localOptions.failureRedirect!.isNotEmpty) {
await res.redirect(localOptions.failureRedirect, code: 401);
return null;
}
if (forceBasic) {
res.headers['www-authenticate'] = 'Basic realm="$realm"';
throw AngelHttpException.notAuthenticated();
return null;
}
return null;
} else if (verificationResult != null && verificationResult != false) {
} else if (verificationResult != false ||
(verificationResult is Map && verificationResult.isNotEmpty)) {
return verificationResult;
} else {
throw AngelHttpException.notAuthenticated();
_log.info('Not authenticated');
throw ProtevusHttpException.notAuthenticated();
}
*/
}
bool _validateString(String? str) => str != null && str.isNotEmpty;
}

View file

@ -1,10 +1,10 @@
import 'dart:async';
import 'package:angel_framework/angel_framework.dart';
import 'package:protevus_framework/protevus_framework.dart';
import 'options.dart';
/// A function that handles login and signup for an Angel application.
/// A function that handles login and signup for an Protevus application.
abstract class AuthStrategy<User> {
/// Authenticates or rejects an incoming user.
FutureOr<User> authenticate(RequestContext req, ResponseContext res,
[AngelAuthOptions<User> options]);
FutureOr<User?> authenticate(RequestContext req, ResponseContext res,
[ProtevusAuthOptions<User>? options]);
}

View file

@ -1,26 +1,35 @@
name: angel_auth
description: A complete authentication plugin for Angel. Includes support for stateless JWT tokens, Basic Auth, and more.
version: 3.0.0
author: Tobe O <thosakwe@gmail.com>
homepage: https://github.com/angel-dart/angel_auth
publish_to: none
name: protevus_auth
description: A complete authentication plugin for Protevus. Includes support for stateless JWT tokens, Basic Auth, and more.
version: 8.2.0
homepage: https://protevus-framework.web.app/
repository: https://github.com/dart-backend/protevus/tree/master/packages/auth
environment:
sdk: ">=2.10.0 <3.0.0"
sdk: '>=3.3.0 <4.0.0'
dependencies:
angel_framework:
git:
url: https://github.com/dukefirehawk/angel.git
ref: sdk-2.12.x
path: packages/framework
charcode: ^1.0.0
collection: ^1.0.0
protevus_framework: ^8.0.0
charcode: ^1.3.0
collection: ^1.17.0
crypto: ^3.0.0
http_parser: ^4.0.0
meta: ^1.0.0
quiver_hashcode: ^2.0.0
meta: ^1.9.0
quiver: ^3.2.0
logging: ^1.2.0
dev_dependencies:
http: ^0.13.0
protevus_container: ^8.0.0
http: ^1.0.0
io: ^1.0.0
logging: ^1.0.0
pedantic: ^1.0.0
test: ^1.15.7
test: ^1.24.0
lints: ^4.0.0
# dependency_overrides:
# protevus_container:
# path: ../container/angel_container
# protevus_framework:
# path: ../framework
# protevus_http_exception:
# path: ../http_exception
# protevus_model:
# path: ../model
# protevus_route:
# path: ../route
# protevus_mock_request:
# path: ../mock_request

View file

@ -1,12 +1,12 @@
import "package:angel_auth/src/auth_token.dart";
import "package:crypto/crypto.dart";
import "package:test/test.dart";
import 'package:protevus_auth/src/auth_token.dart';
import 'package:crypto/crypto.dart';
import 'package:test/test.dart';
main() async {
final Hmac hmac = Hmac(sha256, "angel_auth".codeUnits);
void main() async {
final hmac = Hmac(sha256, 'angel_auth'.codeUnits);
test("sample serialization", () {
var token = AuthToken(ipAddress: "localhost", userId: "thosakwe");
test('sample serialization', () {
var token = AuthToken(ipAddress: 'localhost', userId: 'thosakwe');
var jwt = token.serialize(hmac);
print(jwt);
@ -17,11 +17,11 @@ main() async {
});
test('custom payload', () {
var token = AuthToken(ipAddress: "localhost", userId: "thosakwe", payload: {
"foo": "bar",
"baz": {
"one": 1,
"franken": ["stein"]
var token = AuthToken(ipAddress: 'localhost', userId: 'thosakwe', payload: {
'foo': 'bar',
'baz': {
'one': 1,
'franken': ['stein']
}
});
var jwt = token.serialize(hmac);

View file

@ -1,22 +1,25 @@
import 'dart:io';
import 'package:angel_auth/angel_auth.dart';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:protevus_auth/protevus_auth.dart';
import 'package:protevus_container/mirrors.dart';
import 'package:protevus_framework/protevus_framework.dart';
import 'package:protevus_framework/http.dart';
import 'dart:convert';
import 'package:collection/collection.dart' show IterableExtension;
import 'package:http/http.dart' as http;
import 'package:io/ansi.dart';
import 'package:logging/logging.dart';
import 'package:test/test.dart';
import 'package:collection/collection.dart';
class User extends Model {
String username, password;
String? username, password;
User({this.username, this.password});
static User parse(Map map) {
static User parse(Map<String, dynamic> map) {
return User(
username: map['username'] as String,
password: map['password'] as String,
username: map['username'] as String?,
password: map['password'] as String?,
);
}
@ -31,18 +34,19 @@ class User extends Model {
}
}
main() {
Angel app;
AngelHttp angelHttp;
AngelAuth<User> auth;
http.Client client;
void main() {
late Protevus app;
late ProtevusHttp angelHttp;
ProtevusAuth<User> auth;
http.Client? client;
HttpServer server;
String url;
String? url;
String? encodedAuth;
setUp(() async {
hierarchicalLoggingEnabled = true;
app = Angel();
angelHttp = AngelHttp(app);
app = Protevus(reflector: MirrorsReflector());
angelHttp = ProtevusHttp(app);
app.use('/users', MapService());
var oldErrorHandler = app.errorHandler;
@ -51,7 +55,7 @@ main() {
return oldErrorHandler(e, req, res);
};
app.logger = Logger('angel_auth')
app.logger = Logger('protevus_auth')
..level = Level.FINEST
..onRecord.listen((rec) {
print(rec);
@ -67,29 +71,34 @@ main() {
await app
.findService('users')
.create({'username': 'jdoe1', 'password': 'password'});
?.create({'username': 'jdoe1', 'password': 'password'});
auth = AngelAuth<User>();
auth.serializer = (u) => u.id;
auth.deserializer =
(id) async => await app.findService('users').read(id) as User;
auth = ProtevusAuth<User>(
serializer: (u) => u.id ?? '',
deserializer: (id) async =>
await app.findService('users')?.read(id) as User);
//auth.serializer = (u) => u.id;
//auth.deserializer =
// (id) async => await app.findService('users')!.read(id) as User;
await app.configure(auth.configureServer);
auth.strategies['local'] = LocalAuthStrategy((username, password) async {
var users = await app
.findService('users')
.index()
.then((it) => it.map<User>((m) => User.parse(m as Map)).toList());
return users.firstWhere(
(user) => user.username == username && user.password == password,
orElse: () => null);
});
?.index()
.then((it) => it.map<User>((m) => User.parse(m)).toList());
var result = users?.firstWhereOrNull(
(user) => user.username == username && user.password == password);
return Future.value(result);
}, allowBasic: true);
app.post(
'/login',
auth.authenticate('local',
AngelAuthOptions(callback: (req, res, token) {
ProtevusAuthOptions(callback: (req, res, token) {
res
..write('Hello!')
..close();
@ -97,8 +106,8 @@ main() {
app.chain([
(req, res) {
if (!req.container.has<User>()) {
req.container.registerSingleton<User>(
if (!req.container!.has<User>()) {
req.container!.registerSingleton<User>(
User(username: req.params['name']?.toString()));
}
return true;
@ -108,22 +117,24 @@ main() {
auth.authenticate('local'),
);
encodedAuth = base64.encode(utf8.encode('jdoe1:password'));
client = http.Client();
server = await angelHttp.startServer();
url = 'http://${server.address.address}:${server.port}';
});
tearDown(() async {
client.close();
client!.close();
await angelHttp.close();
app = null;
//app = null;
client = null;
url = null;
});
test('login', () async {
final response = await client.post(Uri.parse('$url/login'),
body: {'username': 'jdoe1', 'password': 'password'});
final response = await client!.post(Uri.parse('$url/login'),
headers: {'Authorization': 'Basic $encodedAuth'});
print('Response: ${response.body}');
expect(response.body, equals('Hello!'));
},
@ -132,10 +143,11 @@ main() {
: null);
test('preserve existing user', () async {
final response = await client.post(Uri.parse('$url/existing/foo'),
final response = await client!.post(Uri.parse('$url/existing/foo'),
body: {'username': 'jdoe1', 'password': 'password'},
headers: {'accept': 'application/json'});
print('Response: ${response.body}');
print(response.headers);
expect(json.decode(response.body)['data']['username'], equals('foo'));
});
}

View file

@ -1,4 +1,4 @@
import 'package:angel_auth/angel_auth.dart';
import 'package:protevus_auth/protevus_auth.dart';
import 'package:test/test.dart';
void main() {
@ -70,6 +70,7 @@ void main() {
);
});
/* Deprecated as clientId and clientSecret cannot be null
test('ensures id not null', () {
expect(
() => ExternalAuthOptions(
@ -89,6 +90,7 @@ void main() {
throwsArgumentError,
);
});
*/
});
group('fromMap()', () {

View file

@ -1,48 +1,58 @@
import 'dart:async';
import 'package:angel_auth/angel_auth.dart';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:protevus_auth/protevus_auth.dart';
import 'package:protevus_container/mirrors.dart';
import 'package:protevus_framework/protevus_framework.dart';
import 'package:protevus_framework/http.dart';
import 'dart:convert';
import 'package:http/http.dart' as http;
import 'package:logging/logging.dart';
import 'package:test/test.dart';
final AngelAuth<Map<String, String>> auth = AngelAuth<Map<String, String>>();
var headers = <String, String>{'accept': 'application/json'};
var localOpts = AngelAuthOptions<Map<String, String>>(
final ProtevusAuth<Map<String, String>> auth =
ProtevusAuth<Map<String, String>>(
serializer: (user) async => '1337',
deserializer: (id) async => sampleUser);
//var headers = <String, String>{'accept': 'application/json'};
var localOpts = ProtevusAuthOptions<Map<String, String>>(
failureRedirect: '/failure', successRedirect: '/success');
var localOpts2 =
ProtevusAuthOptions<Map<String, String>>(canRespondWithJson: false);
Map<String, String> sampleUser = {'hello': 'world'};
Future<Map<String, String>> verifier(String username, String password) async {
Future<Map<String, String>> verifier(String? username, String? password) async {
if (username == 'username' && password == 'password') {
return sampleUser;
} else {
return null;
return {};
}
}
Future wireAuth(Angel app) async {
auth.serializer = (user) async => 1337;
auth.deserializer = (id) async => sampleUser;
Future wireAuth(Protevus app) async {
//auth.serializer = (user) async => 1337;
//auth.deserializer = (id) async => sampleUser;
auth.strategies['local'] = LocalAuthStrategy(verifier);
auth.strategies['local'] = LocalAuthStrategy(verifier, allowBasic: true);
await app.configure(auth.configureServer);
}
void main() async {
Angel app;
AngelHttp angelHttp;
http.Client client;
String url;
String basicAuthUrl;
Protevus app;
late ProtevusHttp angelHttp;
late http.Client client;
String? url;
String? basicAuthUrl;
setUp(() async {
client = http.Client();
app = Angel();
angelHttp = AngelHttp(app, useZone: false);
app = Protevus(reflector: MirrorsReflector());
angelHttp = ProtevusHttp(app, useZone: false);
await app.configure(wireAuth);
app.get('/hello', (req, res) => 'Woo auth',
middleware: [auth.authenticate('local')]);
app.get('/hello', (req, res) {
// => 'Woo auth'
return 'Woo auth';
}, middleware: [auth.authenticate('local', localOpts2)]);
app.post('/login', (req, res) => 'This should not be shown',
middleware: [auth.authenticate('local', localOpts)]);
app.get('/success', (req, res) => 'yep', middleware: [
@ -50,8 +60,11 @@ void main() async {
]);
app.get('/failure', (req, res) => 'nope');
app.logger = Logger('angel_auth')
app.logger = Logger('local_test')
..onRecord.listen((rec) {
print(
'${rec.time}: ${rec.level.name}: ${rec.loggerName}: ${rec.message}');
if (rec.error != null) {
print(rec.error);
print(rec.stackTrace);
@ -66,7 +79,7 @@ void main() async {
tearDown(() async {
await angelHttp.close();
client = null;
//client = null;
url = null;
basicAuthUrl = null;
});
@ -79,28 +92,43 @@ void main() async {
});
test('successRedirect', () async {
var postData = {'username': 'username', 'password': 'password'};
//var postData = {'username': 'username', 'password': 'password'};
var encodedAuth = base64.encode(utf8.encode('username:password'));
var response = await client.post(Uri.parse('$url/login'),
body: json.encode(postData),
headers: {'content-type': 'application/json'});
headers: {'Authorization': 'Basic $encodedAuth'});
expect(response.statusCode, equals(302));
expect(response.headers['location'], equals('/success'));
});
test('failureRedirect', () async {
var postData = {'username': 'password', 'password': 'username'};
//var postData = {'username': 'password', 'password': 'username'};
var encodedAuth = base64.encode(utf8.encode('password:username'));
var response = await client.post(Uri.parse('$url/login'),
body: json.encode(postData),
headers: {'content-type': 'application/json'});
print('Login response: ${response.body}');
headers: {'Authorization': 'Basic $encodedAuth'});
print('Status Code: ${response.statusCode}');
print(response.headers);
print(response.body);
expect(response.headers['location'], equals('/failure'));
expect(response.statusCode, equals(401));
});
test('allow basic', () async {
test('basic auth without authorization', () async {
var response = await client.get(Uri.parse('$url/hello'));
print('Status Code: ${response.statusCode}');
print(response.headers);
print(response.body);
expect(response.statusCode, equals(401));
});
//test('allow basic', () async {
test('basic auth with authorization', () async {
var authString = base64.encode('username:password'.runes.toList());
var response = await client.get(Uri.parse('$url/hello'),
headers: {'authorization': 'Basic $authString'});
print(response.statusCode);
print(response.body);
expect(response.body, equals('"Woo auth"'));
});
@ -117,8 +145,9 @@ void main() async {
'accept': 'application/json',
'content-type': 'application/json'
});
print(response.headers);
print('Header = ${response.headers}');
print('Body <${response.body}>');
expect(response.headers['www-authenticate'], equals('Basic realm="test"'));
var head = response.headers['www-authenticate'];
expect(head, equals('Basic realm="test"'));
});
}

View file

@ -1,17 +1,18 @@
import 'dart:io';
import 'package:angel_auth/angel_auth.dart';
import 'package:protevus_auth/protevus_auth.dart';
import 'package:test/test.dart';
const Duration threeDays = const Duration(days: 3);
const Duration threeDays = Duration(days: 3);
void main() {
Cookie defaultCookie;
var auth = AngelAuth(
secureCookies: true,
cookieDomain: 'SECURE',
jwtLifeSpan: threeDays.inMilliseconds,
);
late Cookie defaultCookie;
var auth = ProtevusAuth(
secureCookies: true,
cookieDomain: 'SECURE',
jwtLifeSpan: threeDays.inMilliseconds,
serializer: (u) => u,
deserializer: (u) => u);
setUp(() => defaultCookie = Cookie('a', 'b'));
@ -21,7 +22,7 @@ void main() {
test('sets expires', () {
var now = DateTime.now();
var expiry = auth.protectCookie(defaultCookie).expires;
var expiry = auth.protectCookie(defaultCookie).expires!;
var diff = expiry.difference(now);
expect(diff.inSeconds, threeDays.inSeconds);
});

View file

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.pub" />
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/build" />
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Dart SDK" level="project" />
<orderEntry type="library" name="Dart Packages" level="project" />
</component>
</module>

View file

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/auth_oauth2.iml" filepath="$PROJECT_DIR$/.idea/auth_oauth2.iml" />
</modules>
</component>
</project>

View file

@ -1,7 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Github Auth Server" type="DartCommandLineRunConfigurationType" factoryName="Dart Command Line Application" singleton="true">
<option name="filePath" value="$PROJECT_DIR$/example/main.dart" />
<option name="workingDirectory" value="$PROJECT_DIR$" />
<method />
</configuration>
</component>

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View file

@ -0,0 +1,12 @@
Primary Authors
===============
* __[Thomas Hii](dukefirehawk.apps@gmail.com)__
Thomas is the current maintainer of the code base. He has refactored and migrated the
code base to support NNBD.
* __[Tobe O](thosakwe@gmail.com)__
Tobe has written much of the original code prior to NNBD migration. He has moved on and
is no longer involved with the project.

View file

@ -1,13 +1,74 @@
# 2.1.0
* Angel 2 + Dart 2 update
# Change Log
## 8.2.0
* Require Dart >= 3.3
* Updated `lints` to 4.0.0
## 8.1.1
* Updated repository link
## 8.1.0
* Updated `lints` to 3.0.0
* Fixed linter warnings
## 8.0.0
* Require Dart >= 3.0
* Issue: `oauth2` does not support `http` 1.0.0
## 7.0.1
* Updated example
## 7.0.0
* Require Dart >= 2.17
## 6.0.0
* Require Dart >= 2.16
## 5.0.0
* Skipped release
## 4.1.0
* Updated linter to `package:lints`
## 4.0.2
* Updated example
## 4.0.1
* Updated README
## 4.0.0
* Migrated to support Dart >= 2.12 NNBD
## 3.0.0
* Migrated to work with Dart >= 2.12.x Non NNBD
## 2.1.0
* Protevus 2 + Dart 2 update
* Support for handling errors + rejections.
* Use `ExternalAuthOptions`.
# 2.0.0+1
## 2.0.0+1
* Meta update to improve Pub score.
# 2.0.0
* Angel 2 + Dart 2 updates.
## 2.0.0
# 1.0.2
Added `getParameters` to `AngelOAuth2Options`.
* Protevus 2 + Dart 2 updates.
## 1.0.2
Added `getParameters` to `ProtevusOAuth2Options`.

View file

@ -1,21 +1,29 @@
MIT License
BSD 3-Clause License
Copyright (c) 2017 Tobe O
Copyright (c) 2021, dukefirehawk.com
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View file

@ -1,14 +1,18 @@
# auth_oauth2
# Protevus OAuth2 Handler
[![Pub](https://img.shields.io/pub/v/angel_auth_oauth2.svg)](https://pub.dartlang.org/packages/angel_auth_oauth2)
![Pub Version (including pre-releases)](https://img.shields.io/pub/v/protevus_auth_oauth2?include_prereleases)
![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)(<https://dart.dev/null-safety>)
[![Discord](https://img.shields.io/discord/1060322353214660698)](https://discord.gg/3X6bxTUdCM)
[![License](https://img.shields.io/github/license/dart-backend/protevus)](https://github.com/dart-backend/protevus/tree/master/packages/auth_oauth2/LICENSE)
`package:angel_auth` strategy for OAuth2 login, i.e. Facebook or Github.
Protevus library for authenticating users with remote identity providers via OAuth2, i.e. Facebook, Google, Azure AD, etc.
## Usage
# Usage
First, create an options object:
```dart
configureServer(Angel app) async {
configureServer(Protevus app) async {
// Load from a Map, i.e. app config:
var opts = ExternalAuthOptions.fromMap(app.configuration['auth0'] as Map);
@ -20,11 +24,10 @@ configureServer(Angel app) async {
}
```
After getting authenticated against the remote server, we need to be able to identify
users within our own application.
After getting authenticated against the remote server, we need to be able to identify users within our own application.
```dart
typedef FutureOr<User> OAuth2Verifier(oauth2.Client, RequestContext, ResponseContext);
typedef OAuth2Verifier = FutureOr<User> Function(oauth2.Client, RequestContext, ResponseContext);
/// You might use a pure function to create a verifier that queries a
/// given service.
@ -49,12 +52,10 @@ OAuth2Verifier oauth2verifier(Service<User> userService) {
}
```
Now, initialize an `OAuth2Strategy`, using the options and verifier.
You'll also need to provide a name for this instance of the strategy.
Consider using the name of the remote authentication provider (ex. `facebook`).
Now, initialize an `OAuth2Strategy`, using the options and verifier. You'll also need to provide a name for this instance of the strategy. Consider using the name of the remote authentication provider (ex. `facebook`).
```dart
configureServer(Angel app) {
configureServer(Protevus app) {
auth.strategies['github'] = OAuth2Strategy(
options,
authorizationEndpoint,
@ -70,19 +71,17 @@ configureServer(Angel app) {
}
```
Lastly, connect it to an `AngelAuth` instance, and wire it up to an `Angel` server.
Set up two routes:
Lastly, connect it to an `ProtevusAuth` instance, and wire it up to an `Protevus` server. Set up two routes:
1. Redirect users to the external provider
2. Acts as a callback and handles an access code
In the case of the callback route, you may want to display an HTML page that closes
a popup window. In this case, use `confirmPopupAuthentication`, which is bundled with
`package:angel_auth`, as a `callback` function:
In the case of the callback route, you may want to display an HTML page that closes a popup window. In this case, use `confirmPopupAuthentication`, which is bundled with `package:protevus_auth`, as a `callback` function:
```dart
configureServer(Angel app) async {
configureServer(Protevus app) async {
// ...
var auth = AngelAuth<User>();
var auth = ProtevusAuth<User>();
auth.strategies['github'] = oauth2Strategy;
// Redirect
@ -91,7 +90,7 @@ configureServer(Angel app) async {
// Callback
app.get('/auth/github/callback', auth.authenticate(
'github',
AngelAuthOptions(callback: confirmPopupAuthentication())
ProtevusAuthOptions(callback: confirmPopupAuthentication())
));
// Connect the plug-in!!!
@ -100,22 +99,20 @@ configureServer(Angel app) async {
```
## Custom Scope Delimiter
This package should work out-of-the-box for most OAuth2 providers, such as Github or Dropbox.
However, if your OAuth2 scopes are separated by a delimiter other than the default (`' '`),
you can add it in the `OAuth2Strategy` constructor:
This package should work out-of-the-box for most OAuth2 providers, such as Github or Dropbox. However, if your OAuth2 scopes are separated by a delimiter other than the default (`' '`), you can add it in the `OAuth2Strategy` constructor:
```dart
configureServer(Angel app) async {
configureServer(Protevus app) async {
OAuth2Strategy(..., delimiter: ' ');
}
```
## Handling non-JSON responses
Many OAuth2 providers do not follow the specification, and do not return
`application/json` responses.
You can add a `getParameters` callback to parse the contents of any arbitrary
response:
Many OAuth2 providers do not follow the specification, and do not return `application/json` responses.
You can add a `getParameters` callback to parse the contents of any arbitrary response:
```dart
OAuth2Strategy(
@ -130,4 +127,4 @@ OAuth2Strategy(
throw FormatException('Invalid content-type $contentType; expected application/x-www-form-urlencoded or application/json.');
}
);
```
```

View file

@ -1,4 +1 @@
include: package:pedantic/analysis_options.yaml
analyzer:
strong-mode:
implicit-casts: false
include: package:lints/recommended.yaml

View file

@ -1,8 +1,8 @@
import 'dart:convert';
import 'package:angel_auth/angel_auth.dart';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:angel_auth_oauth2/angel_auth_oauth2.dart';
import 'package:protevus_auth/protevus_auth.dart';
import 'package:protevus_framework/protevus_framework.dart';
import 'package:protevus_framework/http.dart';
import 'package:protevus_auth_oauth2/protevus_auth_oauth2.dart';
import 'package:http_parser/http_parser.dart';
import 'package:logging/logging.dart';
@ -33,9 +33,9 @@ Map<String, dynamic> parseParamsFromGithub(MediaType contentType, String body) {
void main() async {
// Create the server instance.
var app = Angel();
var http = AngelHttp(app);
app.logger = Logger('angel')
var app = Protevus();
var http = ProtevusHttp(app);
app.logger = Logger('protevus')
..onRecord.listen((rec) {
print(rec);
if (rec.error != null) print(rec.error);
@ -47,11 +47,12 @@ void main() async {
var mappedUserService = userService.map(User.parse, User.serialize);
// Set up the authenticator plugin.
var auth =
AngelAuth<User>(jwtKey: 'oauth2 example secret', allowCookie: false);
auth.serializer = (user) async => user.id;
auth.deserializer = (id) => mappedUserService.read(id.toString());
app.fallback(auth.decodeJwt);
var auth = ProtevusAuth<User>(
serializer: (user) async => user.id ?? '',
deserializer: (id) => mappedUserService.read(id),
jwtKey: 'oauth2 example secret',
allowCookie: false);
await app.configure(auth.configureServer);
/// Create an instance of the strategy class.
auth.strategies['github'] = OAuth2Strategy(
@ -63,7 +64,7 @@ void main() async {
(client, req, res) async {
var response = await client.get(Uri.parse('https://api.github.com/user'));
var ghUser = json.decode(response.body);
var id = ghUser['id'] as int;
var id = ghUser['id'] as int?;
var matchingUsers = await mappedUserService.index({
'query': {'github_id': id}
@ -85,7 +86,7 @@ void main() async {
},
// We have to pass this parser function when working with Github.
getParameters: parseParamsFromGithub,
//getParameters: parseParamsFromGithub,
);
// Mount some routes
@ -93,12 +94,12 @@ void main() async {
app.get(
'/auth/github/callback',
auth.authenticate('github',
AngelAuthOptions(callback: (req, res, jwt) async {
ProtevusAuthOptions(callback: (req, res, jwt) async {
// In real-life, you might include a pop-up callback script.
//
// Use `confirmPopupAuthentication`, which is bundled with
// `package:angel_auth`.
var user = req.container.make<User>();
var user = req.container!.make<User>();
res.write('Your user info: ${user.toJson()}\n\n');
res.write('Your JWT: $jwt');
await res.close();
@ -112,15 +113,12 @@ void main() async {
}
class User extends Model {
@override
String id;
int? githubId;
int githubId;
User({super.id, this.githubId});
User({this.id, this.githubId});
static User parse(Map map) =>
User(id: map['id'] as String, githubId: map['github_id'] as int);
static User parse(Map<String, dynamic> map) =>
User(id: map['id'] as String?, githubId: map['github_id'] as int?);
static Map<String, dynamic> serialize(User user) => user.toJson();

View file

@ -1,12 +1,12 @@
library angel_auth_oauth2;
library protevus_auth_oauth2;
import 'dart:async';
import 'package:angel_auth/angel_auth.dart';
import 'package:angel_framework/angel_framework.dart';
import 'package:protevus_auth/protevus_auth.dart';
import 'package:protevus_framework/protevus_framework.dart';
import 'package:http_parser/http_parser.dart';
import 'package:oauth2/oauth2.dart' as oauth2;
/// An Angel [AuthStrategy] that signs users in via a third-party service that speaks OAuth 2.0.
/// An Protevus [AuthStrategy] that signs users in via a third-party service that speaks OAuth 2.0.
class OAuth2Strategy<User> implements AuthStrategy<User> {
/// A callback that uses the third-party service to authenticate a [User].
///
@ -28,33 +28,33 @@ class OAuth2Strategy<User> implements AuthStrategy<User> {
final Uri tokenEndpoint;
/// An optional callback used to parse the response from a server who does not follow the OAuth 2.0 spec.
final Map<String, dynamic> Function(MediaType, String) getParameters;
final Map<String, dynamic> Function(MediaType?, String)? getParameters;
/// An optional delimiter used to send requests to server who does not follow the OAuth 2.0 spec.
final String delimiter;
Uri _redirect;
Uri? _redirect;
OAuth2Strategy(this.options, this.authorizationEndpoint, this.tokenEndpoint,
this.verifier, this.onError,
{this.getParameters, this.delimiter = ' '});
oauth2.AuthorizationCodeGrant _createGrant() =>
new oauth2.AuthorizationCodeGrant(options.clientId, authorizationEndpoint,
tokenEndpoint,
secret: options.clientSecret,
delimiter: delimiter,
getParameters: getParameters);
oauth2.AuthorizationCodeGrant _createGrant() => oauth2.AuthorizationCodeGrant(
options.clientId, authorizationEndpoint, tokenEndpoint,
secret: options.clientSecret,
delimiter: delimiter,
getParameters: getParameters);
@override
FutureOr<User> authenticate(RequestContext req, ResponseContext res,
[AngelAuthOptions<User> options]) async {
FutureOr<User?> authenticate(RequestContext req, ResponseContext res,
[ProtevusAuthOptions<User>? options]) async {
if (options != null) {
var result = await authenticateCallback(req, res, options);
if (result is User)
if (result is User) {
return result;
else
} else {
return null;
}
}
if (_redirect == null) {
@ -65,20 +65,20 @@ class OAuth2Strategy<User> implements AuthStrategy<User> {
);
}
res.redirect(_redirect);
await res.redirect(_redirect);
return null;
}
/// The endpoint that is invoked by the third-party after successful authentication.
Future<dynamic> authenticateCallback(RequestContext req, ResponseContext res,
[AngelAuthOptions options]) async {
[ProtevusAuthOptions? options]) async {
var grant = _createGrant();
grant.getAuthorizationUrl(this.options.redirectUri,
scopes: this.options.scopes);
try {
var client =
await grant.handleAuthorizationResponse(req.uri.queryParameters);
await grant.handleAuthorizationResponse(req.uri!.queryParameters);
return await verifier(client, req, res);
} on oauth2.AuthorizationException catch (e) {
return await onError(e, req, res);

View file

@ -1,24 +1,30 @@
name: angel_auth_oauth2
description: angel_auth strategy for OAuth2 login, i.e. Facebook, Github, etc.
version: 3.0.0
#author: Tobe O <thosakwe@gmail.com>
publish_to: none
name: protevus_auth_oauth2
version: 8.2.0
description: Protevus library for authenticating users with external identity providers via OAuth2.
homepage: https://protevus-framework.web.app/
repository: https://github.com/dart-backend/protevus/tree/master/packages/auth_oauth2
environment:
sdk: ">=2.10.0 <3.0.0"
homepage: https://github.com/angel-dart/auth_oauth2.git
sdk: '>=3.3.0 <4.0.0'
dependencies:
angel_auth:
git:
url: https://github.com/dukefirehawk/angel.git
ref: sdk-2.12.x
path: packages/auth
angel_framework:
git:
url: https://github.com/dukefirehawk/angel.git
ref: sdk-2.12.x
path: packages/framework
protevus_auth: ^8.0.0
protevus_framework: ^8.0.0
http_parser: ^4.0.0
oauth2: ^2.0.0
dev_dependencies:
logging: ^1.0.0
pedantic: ^1.0.0
logging: ^1.2.0
lints: ^4.0.0
# dependency_overrides:
# protevus_container:
# path: ../container/angel_container
# protevus_framework:
# path: ../framework
# protevus_http_exception:
# path: ../http_exception
# protevus_model:
# path: ../model
# protevus_route:
# path: ../route
# protevus_mock_request:
# path: ../mock_request
# protevus_auth:
# path: ../auth

View file

@ -1,5 +1,36 @@
# 2.0.0
* Angel 2 + Dart 2 suppport.
# Change Log
## 8.0.0
* Require Dart >= 3.3
* Updated `oauth1` to `belatuk_oauth1`
* Updated `lints` to 4.0.0
* Updated repository link
* Fixed linter warnings
## 7.0.0
* Require Dart >= 2.17
## 6.0.0
* Require Dart >= 2.16
## 5.0.0
* Skipped release
## 4.0.0
* Migrated to support Dart >= 2.12 NNBD
## 3.0.0
* Migrated to work with Dart >= 2.12 Non NNBD
## 2.0.0
* Protevus 2 + Dart 2 suppport.
* Use `package:twitter` instead of `package:twit`.
* Add `TwitterAuthorizationException`.
* Add `onError` callback.
* Add `onError` callback.

View file

@ -1,21 +1,29 @@
MIT License
BSD 3-Clause License
Copyright (c) 2016 The Angel Framework
Copyright (c) 2023, dukefirehawk.com
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View file

@ -1,4 +1,11 @@
# auth_twitter
angel_auth strategy for Twitter login.
# Protevus Twitter OAuth1
See the [example](example/server.dart);
![Pub Version (including pre-releases)](https://img.shields.io/pub/v/protevus_auth_twitter?include_prereleases)
![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](<https://dart.dev/null-safety>)
[![Discord](https://img.shields.io/discord/1060322353214660698)](https://discord.gg/3X6bxTUdCM)
[![License](https://img.shields.io/github/license/dart-backend/protevus)](https://github.com/dart-backend/protevus/tree/master/packages/auth_twitter/LICENSE)
**Not ready for release**
Protevus authentication strategy using Twitter OAuth 1.0a.
See the [example](example/example.dart);

View file

@ -1,4 +1 @@
include: package:pedantic/analysis_options.yaml
analyzer:
strong-mode:
implicit-casts: false
include: package:lints/recommended.yaml

View file

@ -1,9 +1,9 @@
import 'dart:convert';
import 'dart:io';
import 'package:angel_auth/angel_auth.dart';
import 'package:angel_auth_twitter/angel_auth_twitter.dart';
import 'package:angel_framework/angel_framework.dart';
import 'package:angel_framework/http.dart';
import 'package:protevus_auth/protevus_auth.dart';
import 'package:protevus_auth_twitter/protevus_auth_twitter.dart';
import 'package:protevus_framework/protevus_framework.dart';
import 'package:protevus_framework/http.dart';
import 'package:logging/logging.dart';
class _User {
@ -14,10 +14,10 @@ class _User {
Map<String, dynamic> toJson() => {'handle': handle};
}
main() async {
var app = Angel();
var http = AngelHttp(app);
var auth = AngelAuth<_User>(
void main() async {
var app = Protevus();
var http = ProtevusHttp(app);
var auth = ProtevusAuth<_User>(
jwtKey: 'AUTH_TWITTER_SECRET',
allowCookie: false,
serializer: (user) async => user.handle,
@ -38,8 +38,8 @@ main() async {
'http://localhost:3000/auth/twitter/callback',
),
(twit, req, res) async {
var response = await twit.twitterClient
.get('https://api.twitter.com/1.1/account/verify_credentials.json');
var response = await twit.client.get(Uri.parse(
'https://api.twitter.com/1.1/account/verify_credentials.json'));
var userData = json.decode(response.body) as Map;
return _User(userData['screen_name'] as String);
},
@ -48,34 +48,31 @@ main() async {
if (e.isDenial) {
res.write("Why'd you say no???");
} else {
res.write("oops: ${e.message}");
res.write('oops: ${e.message}');
}
},
);
app
..fallback(auth.decodeJwt)
..get('/', auth.authenticate('twitter'));
app.get('/', auth.authenticate('twitter'));
app
..get(
'/auth/twitter/callback',
auth.authenticate(
'twitter',
AngelAuthOptions(
callback: (req, res, jwt) {
return res.redirect('/home?token=$jwt');
},
),
app.get(
'/auth/twitter/callback',
auth.authenticate(
'twitter',
ProtevusAuthOptions(
callback: (req, res, jwt) {
return res.redirect('/home?token=$jwt');
},
),
);
),
);
app.get(
'/home',
chain([
requireAuthentication<_User>(),
(req, res) {
var user = req.container.make<_User>();
var user = req.container!.make<_User>();
res.write('Your Twitter handle is ${user.handle}');
return false;
},

View file

@ -1,11 +1,13 @@
import 'dart:async';
import 'dart:convert';
import 'package:angel_auth/angel_auth.dart';
import 'package:angel_framework/angel_framework.dart';
import 'dart:io';
import 'package:protevus_auth/protevus_auth.dart';
import 'package:protevus_framework/protevus_framework.dart';
import 'package:http/http.dart' as http;
import 'package:oauth/oauth.dart' as oauth;
import 'package:path/path.dart' as p;
import 'package:twitter/twitter.dart';
//import 'package:oauth1/oauth1.dart' as oauth;
import 'package:belatuk_oauth1/belatuk_oauth1.dart' as oauth;
import 'package:dart_twitter_api/twitter_api.dart';
/// Authenticates users by connecting to Twitter's API.
class TwitterStrategy<User> extends AuthStrategy<User> {
@ -15,7 +17,7 @@ class TwitterStrategy<User> extends AuthStrategy<User> {
/// A callback that uses Twitter to authenticate a [User].
///
/// As always, return `null` if authentication fails.
final FutureOr<User> Function(Twitter, RequestContext, ResponseContext)
final FutureOr<User> Function(TwitterApi, RequestContext, ResponseContext)
verifier;
/// A callback that is triggered when an OAuth2 error occurs (i.e. the user declines to login);
@ -25,17 +27,47 @@ class TwitterStrategy<User> extends AuthStrategy<User> {
/// The root of Twitter's API. Defaults to `'https://api.twitter.com'`.
final Uri baseUrl;
oauth.Client _client;
oauth.Client? _client;
/// The underlying [oauth.Client] used to query Twitter.
oauth.Client get client => _client;
oauth.Client get client => _client!;
TwitterStrategy(this.options, this.verifier, this.onError,
{http.BaseClient client, Uri baseUrl})
: this.baseUrl = baseUrl ?? Uri.parse('https://api.twitter.com') {
var tokens = oauth.Tokens(
consumerId: options.clientId, consumerKey: options.clientSecret);
_client = oauth.Client(tokens, client: client);
{http.BaseClient? client, Uri? baseUrl})
: baseUrl = baseUrl ?? Uri.parse('https://api.twitter.com') {
// define platform (server)
final oauth.Platform platform = oauth.Platform(
'$baseUrl/oauth/request_token', // temporary credentials request
'$baseUrl/oauth/authorize', // resource owner authorization
'$baseUrl/oauth/access_token', // token credentials request
oauth.SignatureMethods.hmacSha1 // signature method
);
// define client credentials (consumer keys)
final oauth.ClientCredentials clientCredentials =
oauth.ClientCredentials(options.clientId, options.clientSecret);
// create Authorization object with client credentials and platform definition
final oauth.Authorization auth =
oauth.Authorization(clientCredentials, platform);
// request temporary credentials (request tokens)
auth.requestTemporaryCredentials('oob').then((res) {
// redirect to authorization page
print(
"Open with your browser: ${auth.getResourceOwnerAuthorizationURI(res.credentials.token)}");
// get verifier (PIN)
stdout.write("PIN: ");
String verifier = stdin.readLineSync() ?? '';
// request token credentials (access tokens)
return auth.requestTokenCredentials(res.credentials, verifier);
}).then((res) {
// create Client object
_client = oauth.Client(
platform.signatureMethod, clientCredentials, res.credentials);
});
}
/// Handle a response from Twitter.
@ -60,7 +92,7 @@ class TwitterStrategy<User> extends AuthStrategy<User> {
/// Get an access token.
Future<Map<String, String>> getAccessToken(String token, String verifier) {
return _client.post(
return client.post(
baseUrl.replace(path: p.join(baseUrl.path, 'oauth/access_token')),
headers: {
'accept': 'application/json'
@ -75,45 +107,46 @@ class TwitterStrategy<User> extends AuthStrategy<User> {
/// Get a request token.
Future<Map<String, String>> getRequestToken() {
return _client.post(
return client.post(
baseUrl.replace(path: p.join(baseUrl.path, 'oauth/request_token')),
headers: {
'accept': 'application/json'
},
body: {
"oauth_callback": options.redirectUri.toString()
'oauth_callback': options.redirectUri.toString()
}).then(handleUrlEncodedResponse);
}
@override
Future<User> authenticate(RequestContext req, ResponseContext res,
[AngelAuthOptions options]) async {
Future<User?> authenticate(RequestContext req, ResponseContext res,
[ProtevusAuthOptions? options]) async {
try {
if (options != null) {
var result = await authenticateCallback(req, res, options);
if (result is User)
if (result is User) {
return result;
else
} else {
return null;
}
} else {
var result = await getRequestToken();
var token = result['oauth_token'];
var url = baseUrl.replace(
path: p.join(baseUrl.path, 'oauth/authorize'),
queryParameters: {'oauth_token': token});
res.redirect(url);
await res.redirect(url);
return null;
}
} on TwitterAuthorizationException catch (e) {
var result = await onError(e, req, res);
await req.app.executeHandler(result, req, res);
await req.app?.executeHandler(result, req, res);
await res.close();
return null;
}
}
Future authenticateCallback(
RequestContext req, ResponseContext res, AngelAuthOptions options) async {
Future authenticateCallback(RequestContext req, ResponseContext res,
ProtevusAuthOptions options) async {
try {
if (req.queryParameters.containsKey('denied')) {
throw TwitterAuthorizationException(
@ -123,8 +156,13 @@ class TwitterStrategy<User> extends AuthStrategy<User> {
var token = req.queryParameters['oauth_token'] as String;
var verifier = req.queryParameters['oauth_verifier'] as String;
var loginData = await getAccessToken(token, verifier);
var twitter = Twitter(this.options.clientId, this.options.clientSecret,
loginData['oauth_token'], loginData['oauth_token_secret']);
var twitter = TwitterApi(
client: TwitterClient(
consumerKey: this.options.clientId,
consumerSecret: this.options.clientSecret,
token: loginData['oauth_token'] ?? '',
secret: loginData['oauth_token_secret'] ?? ''));
return await this.verifier(twitter, req, res);
} on TwitterAuthorizationException catch (e) {
return await onError(e, req, res);

View file

@ -1,28 +1,34 @@
name: "angel_auth_twitter"
#author: "Tobe O <thosakwe@gmail.com>"
description: "package:angel_auth strategy for Twitter login. Auto-signs requests."
environment:
sdk: ">=2.10.0 <3.0.0"
homepage: "https://github.com/angel-dart/auth_twitter.git"
version: 3.0.0
name: "protevus_auth_twitter"
description: Protevus authentication strategy for Twitter login. Auto-signs requests.
version: 8.0.0
homepage: https://protevus-framework.web.app/
repository: https://github.com/dart-backend/protevus/tree/master/packages/auth_twitter
publish_to: none
environment:
sdk: ">=3.3.0 <4.0.0"
dependencies:
angel_auth:
git:
url: https://github.com/dukefirehawk/angel.git
ref: sdk-2.12.x
path: packages/auth
angel_framework:
git:
url: https://github.com/dukefirehawk/angel.git
ref: sdk-2.12.x
path: packages/framework
http: ^0.13.0
path: ^1.0.0
twitter:
git:
url: https://github.com/dukefirehawk/twitter.dart.git
ref: sdk-2.12.x
protevus_auth: ^8.0.0
protevus_framework: ^8.0.0
http: ^1.0.0
path: ^1.9.0
belatuk_oauth1: ^3.0.0
dart_twitter_api: ^0.5.6+1
dev_dependencies:
logging: ^1.0.0
pedantic: ^1.11.0
logging: ^1.2.0
lints: ^4.0.0
dependency_overrides:
http: ^1.0.0
# protevus_container:
# path: ../container/angel_container
# protevus_framework:
# path: ../framework
# protevus_http_exception:
# path: ../http_exception
# protevus_model:
# path: ../model
# protevus_route:
# path: ../route
# protevus_mock_request:
# path: ../mock_request
# protevus_auth:
# path: ../auth

View file

@ -1,64 +0,0 @@
# Created by .ignore support plugin (hsz.mobi)
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff:
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/dictionaries
# Sensitive or high-churn files:
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.xml
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
# Gradle:
.idea/**/gradle.xml
.idea/**/libraries
# CMake
cmake-build-debug/
# Mongo Explorer plugin:
.idea/**/mongoSettings.xml
## File-based project format:
*.iws
## Plugin-specific files:
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
### Dart template
# See https://www.dartlang.org/tools/private-files.html
# Files and directories created by pub
.packages
.pub/
build/
# If you're building an application, you may want to check-in your pubspec.lock
pubspec.lock
# Directory created by dartdoc
# If you don't generate documentation locally you can remove this line.
doc/api/

View file

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/.pub" />
<excludeFolder url="file://$MODULE_DIR$/build" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Dart SDK" level="project" />
<orderEntry type="library" name="Dart Packages" level="project" />
</component>
</module>

View file

@ -1,421 +0,0 @@
<component name="libraryTable">
<library name="Dart Packages" type="DartPackagesLibraryType">
<properties>
<option name="packageNameToDirsMap">
<entry key="analyzer">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/analyzer-0.32.4/lib" />
</list>
</value>
</entry>
<entry key="args">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/args-1.5.0/lib" />
</list>
</value>
</entry>
<entry key="async">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/async-2.0.8/lib" />
</list>
</value>
</entry>
<entry key="boolean_selector">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/boolean_selector-1.0.4/lib" />
</list>
</value>
</entry>
<entry key="charcode">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/charcode-1.1.2/lib" />
</list>
</value>
</entry>
<entry key="collection">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/collection-1.14.11/lib" />
</list>
</value>
</entry>
<entry key="convert">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/convert-2.0.2/lib" />
</list>
</value>
</entry>
<entry key="crypto">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/crypto-2.0.6/lib" />
</list>
</value>
</entry>
<entry key="csslib">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/csslib-0.14.4+1/lib" />
</list>
</value>
</entry>
<entry key="dart2_constant">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/dart2_constant-1.0.2+dart2/lib" />
</list>
</value>
</entry>
<entry key="front_end">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/front_end-0.1.4/lib" />
</list>
</value>
</entry>
<entry key="glob">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/glob-1.1.7/lib" />
</list>
</value>
</entry>
<entry key="html">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/html-0.13.3+2/lib" />
</list>
</value>
</entry>
<entry key="http">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/http-0.11.3+17/lib" />
</list>
</value>
</entry>
<entry key="http_multi_server">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/http_multi_server-2.0.5/lib" />
</list>
</value>
</entry>
<entry key="http_parser">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/http_parser-3.1.3/lib" />
</list>
</value>
</entry>
<entry key="http_server">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/http_server-0.9.8/lib" />
</list>
</value>
</entry>
<entry key="io">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/io-0.3.3/lib" />
</list>
</value>
</entry>
<entry key="js">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/js-0.6.1+1/lib" />
</list>
</value>
</entry>
<entry key="json_rpc_2">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/json_rpc_2-2.0.9/lib" />
</list>
</value>
</entry>
<entry key="kernel">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/kernel-0.3.4/lib" />
</list>
</value>
</entry>
<entry key="logging">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/logging-0.11.3+2/lib" />
</list>
</value>
</entry>
<entry key="matcher">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/matcher-0.12.3+1/lib" />
</list>
</value>
</entry>
<entry key="meta">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/meta-1.1.6/lib" />
</list>
</value>
</entry>
<entry key="mime">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/mime-0.9.6+2/lib" />
</list>
</value>
</entry>
<entry key="multi_server_socket">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/multi_server_socket-1.0.2/lib" />
</list>
</value>
</entry>
<entry key="node_preamble">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/node_preamble-1.4.4/lib" />
</list>
</value>
</entry>
<entry key="package_config">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/package_config-1.0.5/lib" />
</list>
</value>
</entry>
<entry key="package_resolver">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/package_resolver-1.0.4/lib" />
</list>
</value>
</entry>
<entry key="path">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/path-1.6.2/lib" />
</list>
</value>
</entry>
<entry key="plugin">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/plugin-0.2.0+3/lib" />
</list>
</value>
</entry>
<entry key="pool">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/pool-1.3.6/lib" />
</list>
</value>
</entry>
<entry key="pub_semver">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/pub_semver-1.4.2/lib" />
</list>
</value>
</entry>
<entry key="shelf">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/shelf-0.7.3+3/lib" />
</list>
</value>
</entry>
<entry key="shelf_packages_handler">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/shelf_packages_handler-1.0.4/lib" />
</list>
</value>
</entry>
<entry key="shelf_static">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/shelf_static-0.2.8/lib" />
</list>
</value>
</entry>
<entry key="shelf_web_socket">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/shelf_web_socket-0.2.2+4/lib" />
</list>
</value>
</entry>
<entry key="source_map_stack_trace">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/source_map_stack_trace-1.1.5/lib" />
</list>
</value>
</entry>
<entry key="source_maps">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/source_maps-0.10.7/lib" />
</list>
</value>
</entry>
<entry key="source_span">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/source_span-1.4.1/lib" />
</list>
</value>
</entry>
<entry key="stack_trace">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/stack_trace-1.9.3/lib" />
</list>
</value>
</entry>
<entry key="stream_channel">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/stream_channel-1.6.8/lib" />
</list>
</value>
</entry>
<entry key="string_scanner">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/string_scanner-1.0.3/lib" />
</list>
</value>
</entry>
<entry key="term_glyph">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/term_glyph-1.0.1/lib" />
</list>
</value>
</entry>
<entry key="test">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/test-1.3.0/lib" />
</list>
</value>
</entry>
<entry key="typed_data">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/typed_data-1.1.6/lib" />
</list>
</value>
</entry>
<entry key="utf">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/utf-0.9.0+5/lib" />
</list>
</value>
</entry>
<entry key="vm_service_client">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/vm_service_client-0.2.6/lib" />
</list>
</value>
</entry>
<entry key="watcher">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/watcher-0.9.7+10/lib" />
</list>
</value>
</entry>
<entry key="web_socket_channel">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/web_socket_channel-1.0.9/lib" />
</list>
</value>
</entry>
<entry key="yaml">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/yaml-2.1.15/lib" />
</list>
</value>
</entry>
</option>
</properties>
<CLASSES>
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/analyzer-0.32.4/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/args-1.5.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/async-2.0.8/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/boolean_selector-1.0.4/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/charcode-1.1.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/collection-1.14.11/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/convert-2.0.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/crypto-2.0.6/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/csslib-0.14.4+1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/dart2_constant-1.0.2+dart2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/front_end-0.1.4/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/glob-1.1.7/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/html-0.13.3+2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/http-0.11.3+17/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/http_multi_server-2.0.5/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/http_parser-3.1.3/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/http_server-0.9.8/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/io-0.3.3/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/js-0.6.1+1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/json_rpc_2-2.0.9/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/kernel-0.3.4/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/logging-0.11.3+2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/matcher-0.12.3+1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/meta-1.1.6/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/mime-0.9.6+2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/multi_server_socket-1.0.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/node_preamble-1.4.4/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/package_config-1.0.5/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/package_resolver-1.0.4/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/path-1.6.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/plugin-0.2.0+3/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/pool-1.3.6/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/pub_semver-1.4.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/shelf-0.7.3+3/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/shelf_packages_handler-1.0.4/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/shelf_static-0.2.8/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/shelf_web_socket-0.2.2+4/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/source_map_stack_trace-1.1.5/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/source_maps-0.10.7/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/source_span-1.4.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/stack_trace-1.9.3/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/stream_channel-1.6.8/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/string_scanner-1.0.3/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/term_glyph-1.0.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/test-1.3.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/typed_data-1.1.6/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/utf-0.9.0+5/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/vm_service_client-0.2.6/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/watcher-0.9.7+10/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/web_socket_channel-1.0.9/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/yaml-2.1.15/lib" />
</CLASSES>
<JAVADOC />
<LIBRARY_FILE />
<SOURCES />
</library>
</component>

View file

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/body_parser.iml" filepath="$PROJECT_DIR$/.idea/body_parser.iml" />
</modules>
</component>
</project>

View file

@ -1,7 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="main.dart" type="DartCommandLineRunConfigurationType" factoryName="Dart Command Line Application" singleton="true" nameIsGenerated="true">
<option name="filePath" value="$PROJECT_DIR$/example/main.dart" />
<option name="workingDirectory" value="$PROJECT_DIR$" />
<method />
</configuration>
</component>

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

View file

@ -1,4 +0,0 @@
language: dart
dart:
- dev
- stable

Some files were not shown because too many files have changed in this diff Show more