Commit Graph

1998 Commits

Author SHA1 Message Date
Dan Brown
0ba75713e1
Fixed github action workflow 2020-01-18 15:30:54 +00:00
Dan Brown
281200e212
Further updated github actions config
- Added composer caching based off github docs.
- Focused when actions run so they're not running unneccessarily.
2020-01-18 15:27:57 +00:00
Dan Brown
4ed23b0187
Added caching to github action workflow 2020-01-18 15:17:21 +00:00
Dan Brown
517687669c
Merge pull request #1826 from BookStackApp/api_origins
Baseline API Implementation
2020-01-18 15:10:35 +00:00
Dan Brown
be554b9c79
Added configurable API throttling, Handled API errors standardly 2020-01-18 15:03:28 +00:00
Dan Brown
1350136ca3
Fixed bad test class name 2020-01-18 14:07:43 +00:00
Dan Brown
b9fb655b60
Added "Getting Started" API docs 2020-01-18 14:03:11 +00:00
Dan Brown
64455307b1
Added a few test to cover api docs pages 2020-01-18 10:04:13 +00:00
Dan Brown
8ead596067
Updated default codemirror theme
- To mdn-like theme, to have better default legibility and contrast
2020-01-18 09:55:02 +00:00
Dan Brown
8016f1121e
Refined docs view, Added example requests 2020-01-18 09:48:30 +00:00
Dan Brown
45b5e631e2
Added a view for the API docs 2020-01-15 20:18:02 +00:00
Dan Brown
bed2498667
Started work on generating API docs 2020-01-12 16:25:14 +00:00
Dan Brown
04a8614136
Filled out base Book API endpoints, added example responses 2020-01-12 14:45:54 +00:00
Dan Brown
a8595d8aaf
Fixed test class names + add perm. check to api session auth 2020-01-01 17:01:36 +00:00
Dan Brown
a7a97a53f1
Added API listing filtering & cleaned ApiAuthenticate returns
API listing endpoint filter can be found via &filter[name]=my+book query
parameters. There are a range of operators that can be used such as
&filter[id:gte]=4
2020-01-01 16:33:47 +00:00
Dan Brown
55abf7be24
Added tests to cover API config and listing code 2019-12-30 20:48:23 +00:00
Dan Brown
3cacda6762
Added expiry checking to API token auth
- Added test to cover to ensure its checked going forward
2019-12-30 19:51:41 +00:00
Dan Brown
3d11cba223
Added testing coverage to API token auth 2019-12-30 19:42:46 +00:00
Dan Brown
6f1b88a6a6
Change email confirmation from own middle to trait
Email confirmation middleware caused more mess than good, As caused
priority issues and it depended on auth actions. Instead its now a trai
used on auth middlewares.

Also used 'EncryptCookies' middleware on API instead of custom
decryption in custom middleware since we'd need to do replicate all the
same actions anyway. Shouldn't have too much effect since it only
actions over cookies that exist, of which none should be there for most
API requests.

Also split out some large guard functions to be a little more readable
and appease codeclimate.
2019-12-30 15:49:20 +00:00
Dan Brown
349b4629be
Extracted API auth into guard
Also implemented more elegant solution to allowing session auth for API
routes; A new 'StartSessionIfCookieExists' middleware, which wraps the
default 'StartSession' middleware will run for API routes which only
sets up the session if a session cookie is found on the request. Also
decrypts only the session cookie.

Also cleaned some TokenController codeclimate warnings.
2019-12-30 14:51:28 +00:00
Dan Brown
3de55ee645
Linked new API token system into middleware
Base logic in place but needs review and refactor to see if can better
fit into Laravel using 'Guard' system. Currently has issues due to
cookies in use from active session on API.
2019-12-30 02:16:07 +00:00
Dan Brown
2cfa37399c
Fixed some empty-expiry conditions of token ui flows 2019-12-29 20:18:37 +00:00
Dan Brown
692fc46c7d
Removed token 'client' text, avoid confusion w/ oAuth
- Instead have a token_id and a secret.
   - Displayed a 'Token ID' and 'Token Secret'.
2019-12-29 20:07:28 +00:00
Dan Brown
832fbd65af
Added testing coverage to user API token interfaces 2019-12-29 19:46:46 +00:00
Dan Brown
dccb279c84
Built out interfaces & endpoints for API token managment 2019-12-29 17:03:52 +00:00
Dan Brown
d336ba6874
Started work on API token controls
- Added access-api permission.
- Started user profile UI work.
- Created database table and model for tokens.
- Fixed incorrect templates down migration :(
2019-12-29 13:02:26 +00:00
Dan Brown
04137e7c98
Started core API route work 2019-12-28 14:58:07 +00:00
Dan Brown
c055310507
Updated to latest laravel 6 version 2019-12-28 13:01:42 +00:00
Dan Brown
5c040bf2b7
Merge branch 'albergoniSivaf-master' 2019-12-27 17:15:45 +00:00
Dan Brown
cf743370a8
Updated code block lang order and added extra pascal option
- Fixed modal window sizing/positioning to be properly center and
responsive.

Related to #1730
2019-12-27 17:14:34 +00:00
Dan Brown
891dbfe085
Merge branch 'master' of git://github.com/albergoniSivaf/BookStack into albergoniSivaf-master 2019-12-27 17:03:10 +00:00
Dan Brown
6f9cad2106
Merge pull request #1793 from abublihi/master
Fix An Exception
2019-12-27 16:52:07 +00:00
Dan Brown
a433cde3b7
Merge pull request #1824 from BookStackApp/l10n_master
New Crowdin translations
2019-12-27 16:46:02 +00:00
Dan Brown
91081a0d72 New translations validation.php (German Informal) 2019-12-27 16:40:44 +00:00
Dan Brown
77c2b2ef64 New translations common.php (Slovak) 2019-12-27 16:40:43 +00:00
Dan Brown
426440d552 New translations errors.php (Slovak) 2019-12-27 16:40:40 +00:00
Dan Brown
a8ebcfaef6 New translations settings.php (Slovak) 2019-12-27 16:40:38 +00:00
Dan Brown
4db8c1279a New translations entities.php (Spanish) 2019-12-27 16:40:35 +00:00
Dan Brown
0ec4ca033c New translations errors.php (Spanish) 2019-12-27 16:40:33 +00:00
Dan Brown
0c446800a6 New translations settings.php (Spanish) 2019-12-27 16:40:31 +00:00
Dan Brown
2246b468bc New translations validation.php (Spanish) 2019-12-27 16:40:30 +00:00
Dan Brown
d7673c6a7b New translations common.php (Spanish) 2019-12-27 16:40:28 +00:00
Dan Brown
8269f99114 New translations common.php (Spanish, Argentina) 2019-12-27 16:40:27 +00:00
Dan Brown
9798fa8ba7 New translations settings.php (Russian) 2019-12-27 16:40:25 +00:00
Dan Brown
420baa2f65 New translations settings.php (Polish) 2019-12-27 16:40:24 +00:00
Dan Brown
f259bc2f15 New translations validation.php (Polish) 2019-12-27 16:40:22 +00:00
Dan Brown
312153befc New translations common.php (Portuguese, Brazilian) 2019-12-27 16:40:20 +00:00
Dan Brown
f85bf94c80 New translations errors.php (Portuguese, Brazilian) 2019-12-27 16:40:17 +00:00
Dan Brown
971c0b1b88 New translations activities.php (Russian) 2019-12-27 16:40:15 +00:00
Dan Brown
eff87696bc New translations auth.php (Russian) 2019-12-27 16:40:14 +00:00