Simon Goller
20a5f5859b
Let expire the user cookie more quickly
...
This will hopefully fix the OIDC issue by causing the backend
to refresh the token more frequently.
2024-06-12 07:59:51 +02:00
Simon Goller
e1f9936b62
Add REST endpoint to find bookings per week
2024-06-12 07:38:51 +02:00
Simon Goller
47a3de3c54
Remove axum-utils from dependencies
2024-06-10 08:45:07 +02:00
Simon Goller
f7f789f3c0
Fix OIDC build
2024-06-10 08:40:48 +02:00
Simon Goller
315f715215
Improve experience for dev setup
2024-06-10 08:37:46 +02:00
Simon Goller
764faa6e6b
Use rest-types to export TOs to the frontend
2024-06-06 08:29:56 +02:00
Simon Goller
91559224e5
Fix clippy findings
2024-06-06 08:08:30 +02:00
Simon Goller
99b9d85e47
Remove build.nix and use it on another repo
2024-06-06 07:47:40 +02:00
Simon Goller
69c357b69e
Fix import warnings
2024-06-06 07:33:54 +02:00
Simon Goller
506791fa6a
Make auth-info endpoint machine readable
2024-06-05 22:30:09 +02:00
Simon Goller
e2f5b04ff1
Improve feature management
...
By default, it will build with the dev-setup where authenticated
user will be faked since there is no login page on the local dev
setup. In order to compile it with oidc, disable default features
and enable the oidc feature.
2024-06-05 21:21:42 +02:00
Simon Goller
258726cd87
Disable features
2024-06-05 18:04:27 +02:00
Simon Goller
3c670d50d3
Use OIDC username
2024-06-05 18:00:05 +02:00
Simon Goller
9888ac4062
Display some more OIDC information
2024-06-05 16:36:31 +02:00
Simon Goller
1565fc0017
Add aditional oidc endpoint to get user info
2024-06-05 16:01:46 +02:00
Simon Goller
46a833cc1d
Fix startup issue
2024-06-05 11:29:25 +02:00
Simon Goller
9944d9ffc4
Add separate oidc authenticate endpoint
2024-06-05 11:02:41 +02:00
Simon Goller
0bf1f1a540
Add ci sqlx files
2024-06-04 20:48:46 +02:00
Simon Goller
a868ceb0cd
Add oidc support
2024-06-04 20:07:58 +02:00
Simon Goller
ed609cf06c
Cargo clippy and cargo fmt
2024-05-09 15:00:50 +02:00
Simon Goller
b0000c0117
Wrap Context with Autentication enum
...
Context should contain information which is required to get
the information if the service call is authenticated. Context
could be the username for example. But services call other
services internally and for this, authentication must not be
checked. In this case, they can now pass Authentication::Full
which always successfully authenticates.
2024-05-09 14:58:19 +02:00
Simon Goller
bf94ec33de
Basic rest implementation for connecting user to sales-person
2024-05-09 14:16:47 +02:00
Simon Goller
e3ec694876
Add checks for booking and fix database timestamps
2024-05-09 09:45:53 +02:00
Simon Goller
bc8a534353
Add id check for booking
...
It now checks if sales_person_id and slot_id actually exists.
2024-05-09 08:11:38 +02:00
Simon Goller
418a2944f7
Add nix files
...
* Build file
* Docker file
2024-05-09 07:18:35 +02:00
Simon Goller
8ea16624ad
Add rest service for booking
2024-05-09 07:16:38 +02:00
Simon Goller
d8dcc7099d
Prepare sqlx for offline checks
2024-05-09 07:16:15 +02:00
Simon Goller
71c1432fd1
Add booking dao implementations
2024-05-07 18:19:00 +02:00
Simon Goller
4bca60a23c
Implement booking service without validity checks
2024-05-07 08:31:50 +02:00
Simon Goller
8efc3843ad
Add sales-person REST service
2024-05-06 15:15:47 +02:00
Simon Goller
ad88a1c983
Add service for sales_persond
2024-05-06 13:33:54 +02:00
Simon Goller
20828fb4a1
Add context reqruied later for authentication
2024-05-03 19:01:26 +02:00
Simon Goller
9a367c9260
Move the error type test functions into its own module
2024-05-03 06:42:45 +02:00
Simon Goller
8f378472ea
Add REST endpoint for slot
2024-05-02 23:25:04 +02:00
Simon Goller
82e89baeeb
Restructuring: Move permission code in separate modules
2024-04-30 15:06:12 +02:00
Simon Goller
b964063dbb
Finalize permission service
2024-04-29 06:29:25 +02:00
Simon Goller
d45ccf9523
REST servcie restructuring
...
App devices which implementation will be used. For now,
the types of the implementations must be defined manually.
This is requied because the State in the REST endpoints must
contain a type which can provide all services.
2024-04-28 22:30:10 +02:00
Simon Goller
2931d37602
Fix clippy finding
2024-04-28 16:02:03 +02:00
Simon Goller
691eccc2a4
Create service and DAO layer for user-role-privilege system
2024-04-28 16:01:18 +02:00
Simon Goller
ab260120f2
Create the roles and privileges required for MVP
2024-04-27 15:43:59 +02:00
Simon Goller
3b20d12ba1
Add unit tests for the services
2024-04-27 00:03:15 +02:00
Simon Goller
926ac006e7
Return the username in a separate service
...
This allows us to use a service implementation which
returns a dummy user during development and the actual authenticated
user during production. It also simplifies tests.
2024-04-26 22:41:44 +02:00
Simon Goller
789981ee92
Imporove datamodel
...
Tables now contain update_timestamp and update_process and
update_timestamp will be automatically set via a trigger.
Also the I removed the IDs from the tables as they are not
required for the auth system. The names are the identifier.
2024-04-26 22:30:10 +02:00
Simon Goller
dccfa2d4cf
Initial commit
2024-04-26 21:34:00 +02:00