51 Commits

Author SHA1 Message Date
lejianwen
a7c087afbb fix!: Update peer to use ID instead of UUID 2025-08-31 12:46:54 +08:00
k3-cat
af4813db30 feat: better autorenewal (#305) 2025-07-04 14:27:47 +08:00
Plynksiy Nikita
9d2b589faa feat(password): Password hashing with bcrypt (#290)
* feat(password): add configurable password hashing with md5 and bcrypt

* docs: add password hashing algorithm configuration (bcrypt/md5)

* feat(password): better bcrypt fallback and minor refactoring

* feat(password): handle errors in password encryption and verification

* feat(password): remove password hashing algorithm configuration
2025-06-24 17:23:36 +08:00
lejianwen
d4fdf3785b feat(register): Register status can be set (#223) 2025-05-25 17:03:13 +08:00
lejianwen
403d9c2233 style(service): refactor global dependencies to use local variables 2025-02-26 19:15:38 +08:00
lejianwen
c0346ff9e1 fix(config)!: Token expire time (#145)
将配置中的过期时间单位统一为time.Duration,可以设置为`h`,`m`,`s`
2025-02-17 10:49:59 +08:00
lejianwen
63cf231bdc fix(admin): Admin web title 2025-02-12 21:10:07 +08:00
lejianwen
6aebf061a4 style: Module name 2025-02-12 19:46:39 +08:00
lejianwen
32a9eda8ca style: Module name 2025-02-12 16:07:51 +08:00
Tao Chen
5224c31d61 fix: When OIDC and LDAP work togethar (#132 #134)
* fix OIDC create user if LDAP enable

* `newUser.GroupId = 1` for ldap

* fix
2025-02-10 10:08:49 +08:00
lejianwen
12442f1ba0 fix(api): Add Default Token Expire (#113) 2025-02-03 13:18:08 +08:00
Tao Chen
0e3f204327 feat(ldap): Add LDAP
* rename: Admin to AdminGroup

* update

* cleanup

* tmp save group mapping

* add enableControl(not-test)

* verify username exist before create(for LDAP)

* add getAllGroupsDn()

* rename

* adminGroup

* enable TLS Verify

* init for ldap

---------

Co-authored-by: Tao Chen <iamtaochen@outlook.com>
2025-02-02 23:59:52 +08:00
lejianwen
d9fcfdde6a feat(api): Add api token expire
Resolves #109
2025-01-21 18:23:28 +08:00
lejianwen
a4433e6113 fix: Jwt 2025-01-15 20:26:26 +08:00
lejianwen
edb095ab0b feat!: Add JWT
- `RUSTDESK_API_JWT_KEY`如果设置,将会启用JWT,token自动续期功能将失效
- 此功能是为了server端校验token的合法性
2025-01-15 19:25:28 +08:00
lejianwen
18312336a4 refactor(admin): Move Admin Web Route to user model 2024-12-27 19:27:33 +08:00
lejianwen
1c5cd3ae62 add batch delete user token 2024-12-06 10:36:27 +08:00
ljw
70a03f1aba fix #52 & add auto refresh token #53 2024-11-07 10:46:00 +08:00
Tao Chen
34a27ba073 add error information 2024-11-06 15:06:15 +08:00
Tao Chen
956700c27f fix: cannot delete user 2024-11-06 14:36:12 +08:00
ljw
daeae19194 up oauth re 2024-11-05 11:48:35 +08:00
Tao Chen
5a53f180e4 fix: delete check 2024-11-03 22:23:24 +08:00
Tao Chen
ca79a63492 fix: call us.IsAdmin(u) to check admin 2024-11-03 21:59:17 +08:00
Tao Chen
aee25a6c99 fix: last admin shouldn't be deleted, disabled or demoted 2024-11-03 17:19:05 +08:00
Tao Chen
da7b70c471 add err for RegisterByOauth 2024-11-03 16:49:03 +08:00
Tao Chen
2ceaa0091b fix: Email of Register 2024-11-03 05:07:17 +08:00
Tao Chen
6fb1fbc5b1 fix: RegisterByOauth without Email 2024-11-03 04:35:39 +08:00
Tao Chen
d85a799d0b set user_id=0 at peers, when the user is deleted 2024-11-02 08:24:07 +08:00
Tao Chen
d38117107d When login, peer doesn't exist, it should create 2024-11-02 08:19:44 +08:00
Tao Chen
6a7ef29089 delete the token when delete a peer 2024-11-02 08:02:03 +08:00
Tao Chen
71d1c431a9 add DeviceId to userToken 2024-11-02 05:42:47 +08:00
Tao Chen
d31d669734 logout should unbind uuid and uid of peer 2024-11-02 05:07:41 +08:00
Tao Chen
485ae54e9e re-construct oauth 2024-11-02 04:01:28 +08:00
ljw
6c94566e83 add remove user token #34 2024-10-31 22:29:12 +08:00
Tao Chen
5488babfb3 Merge branch 'master' into resetEmptyPassWD 2024-10-31 16:35:32 +08:00
Tao Chen
bd2eeae01a add IsPasswordEmpty... 2024-10-31 16:22:42 +08:00
ljw
e2fda47cbb add register 2024-10-31 15:14:30 +08:00
ljw
b3edc9d112 up del user 2024-10-30 19:34:56 +08:00
Tao Chen
f6a0c6466f modify delete user 2024-10-30 16:33:01 +08:00
Tao Chen
3041fb82d9 delete user from user_thirds, too 2024-10-30 15:59:33 +08:00
bc92ffc106 Merge pull request #30 from IamTaoChen/oidc
Add General OIDC Login
2024-10-30 14:40:10 +08:00
Tao Chen
9eff8ea33a fix: spelling 2024-10-29 23:00:17 +08:00
ljw
001884a4d8 fix oauth register #26 #23 2024-10-29 15:31:27 +08:00
Tao Chen
4105f14a3f try add oidc 2024-10-29 11:51:01 +08:00
ljw
8ee93b530d add address book name &
add share address book
2024-10-28 14:51:07 +08:00
ljw
e142cc00c6 add conn log 2024-10-18 15:05:58 +08:00
ljw
b4965e8885 add login fail warn &
add web client on/off &
up admin peer filter &
upgrade web client
2024-10-14 10:43:29 +08:00
ljw
0a81b5b5f8 fix group peers 2024-09-24 19:35:20 +08:00
ljw
1e3403e3c5 add google oauth 2024-09-20 12:13:15 +08:00
ljw
a4b413dadb add oauth loginlog & fix bugs 2024-09-19 10:44:49 +08:00