Commit Graph

31 Commits

Author SHA1 Message Date
im-adithya
e681e69fa2 chore: use limits from JWT if available 2023-12-05 15:58:45 +05:30
Michael Bumann
bc8184175a Add user ID to sentry context
This sends the user ID to sentry
2022-05-17 14:39:39 +02:00
kiwiidb
c24d1599d0 refactor parse token 2022-04-20 16:25:01 +02:00
kiwiidb
bbe47cbd4c Merge branch 'main' into feature/event-stream 2022-04-12 15:30:51 +02:00
Stefan Kostic
e5c2e5337f Add ignoreErrors to sentry 2022-04-06 17:15:17 +02:00
kiwiidb
0341276f4d use websocket instead of sse because more client support 2022-03-24 13:55:11 +01:00
Stefan Kostic
902135838c Cleanup 2022-02-24 23:36:08 +01:00
Stefan Kostic
d4032de94c Check if token is valid in util method 2022-02-24 22:54:50 +01:00
Stefan Kostic
5301d592bd Extend util method to check if token is refresh 2022-02-24 21:18:13 +01:00
Stefan Kostic
371124f77e Add jwt util to parse user id from token 2022-02-24 21:05:12 +01:00
Michael Bumann
7bd74a69d8 User service for all user related functions 2022-01-19 21:16:20 +01:00
kiwiidb
5c3e3b2a30 throw away useless context 2022-01-19 14:01:32 +01:00
kiwiidb
e22ab6ce49 rename context to service 2022-01-19 13:53:40 +01:00
Viktor Patchev
919affa2db Update package name to new repo 2022-01-18 10:42:53 +01:00
Michael Bumann
6478c6e0db Make JWT expiry configurable and require to set a JWT secret 2022-01-17 11:11:28 +01:00
Michael Bumann
1150ad6154 Merge remote-tracking branch 'getalby/main' into logging
* getalby/main:
  Minor fixes
2022-01-17 10:43:18 +01:00
Michael Bumann
236427b8e2 Use Echo logger 2022-01-17 10:22:02 +01:00
Michael Bumann
dd01815327 Limit for user find 2022-01-17 10:19:41 +01:00
Viktor Patchev
a34fece550 Minor fixes 2022-01-17 09:50:37 +01:00
Michael Bumann
06410ec1de Use custom JWT claims and fix expiry 2022-01-17 07:48:46 +01:00
Roman Useinov
c5170a0a1e fix expiry and validate claims 2022-01-16 16:02:37 +00:00
Roman Useinov
e22c51f9f9 use DefaultConfig as base for JWT 2022-01-16 14:14:53 +00:00
Roman Useinov
e7e5904829 UserMiddleware added 2022-01-16 14:02:58 +00:00
Roman Useinov
6c6e647cb6 fix naming after rebase 2022-01-16 13:27:16 +00:00
Michael Bumann
1b347c5177 Move JWT middleware config to tokens and load UserId into the context 2022-01-16 13:26:42 +00:00
Michael Bumann
b1dd3012fd Remove sensitive data from JWT and add expiry 2022-01-16 13:26:42 +00:00
Roman Useinov
628071160c Cleanup (#25)
* remove cmd folder as we are going to have only one entrypoint

* get rid of pkg directory

* rename test -> integration_tests as unit tests should reside next to the actual files they are testing

* database migration WIP

* reinstate gorm boilerplate in the addinvoice for now to make it compile

* introduce migrations

* add Makefile

* don't use unsigned types for database mappings

* migrations work now

* add build target

* use echo groups

* gorm removed

* add envconfig

* fix comments
2022-01-16 00:49:19 +01:00
Viktor Patchev
1ee2bdb909 Change folder structure 2022-01-10 21:15:30 +01:00
Viktor Patchev
76cc532079 NullString fixes 2022-01-09 15:47:45 +01:00
Michael Bumann
2223ef41d9 User model updates
also use sql.NullString to set access/refresh token
2022-01-08 18:03:06 +01:00
Viktor Patchev
47d8b70429 Add tokens in separate directory 2022-01-08 12:14:52 +01:00