Commit graph

37 commits

Author SHA1 Message Date
Sonja Happ
302b1cc470 move functions to duplicate scenarios into respective packages, resolve circular dependency problems (move permissions checking to database package), improve error handling of async DuplicateScenarioForUser function 2021-10-18 17:20:28 +02:00
fab5fbf66a fix user tests 2021-02-08 11:56:14 +01:00
fe2d291bb3 add support for external authentication via OAuth2 proxy 2021-02-08 11:55:36 +01:00
ffa532bddc user: add NewUser() 2021-02-08 11:55:36 +01:00
59c924bcff update package name of response docs as changed upstream in swag 2021-02-05 22:44:45 +01:00
c404c7af5a make JWT secret and expiry time configurable 2021-01-25 10:56:40 +01:00
Sonja Happ
c4d7fc9488 add APIkey-based authentication to swagger documentation 2020-09-25 16:16:46 +02:00
Sonja Happ
92f22035c6 add GPL 3.0 license statement in all (not auto-generated) code files 2019-11-20 11:08:33 +01:00
Sonja Happ
a8a43f8512 Improvements for swagger API documentation
- Adds Authorization token as required header param to all endpoints (except authenticate itself)
- Documents correct data format for request bodies (relevant for updating and adding elements)
- No functional changes applied
2019-11-13 14:48:08 +01:00
2311d643c6 fix repo path 2019-11-09 11:40:56 +01:00
Sonja Happ
df910c56f7 admin password required to change user's password as admin, fixes #24 2019-11-05 12:05:39 +01:00
Sonja Happ
bae3bc9046 user: admin user can change password of any user without knowing old password 2019-10-24 12:44:26 +02:00
Sonja Happ
505358daaa user: fix get user endpoint for non admin users 2019-10-24 11:37:27 +02:00
Sonja Happ
14972262c0 add "Active" bool property to user model, required modifications in user and scenario packages 2019-09-17 17:00:07 +02:00
Sonja Happ
ebf390e9cc update version of swag tool, use swag again in CI, works on #22 2019-09-16 09:17:31 +02:00
Sonja Happ
b570956baf improve user package
- testing more error return codes
- remove some errors from code
- remove unnecessary code
- require a username of at least 3 letters/digits
2019-09-12 10:18:42 +02:00
Sonja Happ
f3a7ed0e61 **Major revision of repository structure**
- rename common package to database
- move all code not related to database to new helper package
- add more test in database package to improve code coverage
- add a new (own) package for AMQP client
2019-09-10 16:28:57 +02:00
Sonja Happ
2ffda7cad8 - revise naming of some common functions
- improve returning of error codes by using common functions
- use a separate file for authentication endpoint to improve clarity of code
2019-09-09 15:30:17 +02:00
Sonja Happ
7b8fc67512 fix some bugs with userID caused by code restructuring in prev commits 2019-09-09 12:42:27 +02:00
Sonja Happ
ac9e564bc8 - deleting old obsolete test functions
- move all data and functions solely used for testing to the file test_utilities
- get rid of utilities file
2019-09-09 12:11:55 +02:00
Sonja Happ
6221f7d851 user testing: fix responses of successful queries 2019-09-03 16:59:30 +02:00
Sonja Happ
bddbfc028d fix swaggo documentation of user endpoints 2019-09-03 12:03:47 +02:00
smavros
f4a15e914e Merge branch 'master' into test-user-endpoints 2019-08-30 15:47:54 +02:00
smavros
68feed0dac Small improvements in user endpoints 2019-08-25 21:52:36 +02:00
smavros
02f2156c1e Changes response of POST,PUT and DELETE:
For being able to easily debug and test the checkpoints which are
    adding, modifying or deleting a user the response should be the
    affected user object. Not only its ID.
2019-08-18 17:17:16 +02:00
smavros
c2429394ed Renames VisitorAuthenticate() to RegisterAuthenticate() 2019-08-15 14:52:19 +02:00
smavros
8ce554b6d7 Modifies user/ endpoint:
Functions `addUser()`, `updateUser()` and `deleteUser()` now return
    a body of `{ "id": $userID }`.
2019-08-15 14:34:35 +02:00
smavros
7529f4803f Improves PUT /user/$ID {$updatedUser} endpoint:
- Improves the semantics and scope of the updatedUser() by moving
    operations in updateUserRequest's updatedUser() method.
    - Fixes the marshaling of the updateUserRequest by renaming and
    embedding the already existing type.
    - Fixes bug of password hashing by using `omitempty` tags in the
    update struct.
2019-08-15 00:36:03 +02:00
smavros
74b27f7525 Remove redundant structs and methods:
UserSerializer, UsersSerializer, AuthResponse, UserResponse.
2019-08-13 16:40:54 +02:00
smavros
42f473cde0 Fix bug of User marshaling:
Instead of using the json.Marshal() we can user `gin.H` type of the
    response that will be passed through an XMLMarshaler. In that case
    we don't even need the responses structs!!
2019-08-13 16:20:58 +02:00
smavros
28d81e52c2 Derpecates UsersSerializer() from user endpoints 2019-08-13 16:17:37 +02:00
smavros
50b1902bf3 Deprecates common.UserSerializer() from user endpoints 2019-08-13 15:49:33 +02:00
Sonja Happ
f84e6a1dda Fix in getUser endpoint for role User 2019-07-31 14:03:43 +02:00
smavros
e6c8fff397 Merge remote-tracking branch 'origin/master' into user-validators 2019-07-26 15:29:45 +02:00
Sonja Happ
e9ed836ba3 fix typo in registration of user endpoints 2019-07-23 17:19:42 +02:00
Sonja Happ
9faec2e805 return user in auth response 2019-07-18 15:25:06 +02:00
Sonja Happ
f0be5cce00 file renaming 2019-07-18 13:25:41 +02:00
Renamed from routes/user/userEndpoints.go (Browse further)