mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-04-28 14:29:19 +08:00
fix: usertoken auth. (#2677)
* refactor: update fields type in userStatus and check registered. * fix: usertoken auth. * update contents. * update content. * update * fix * update pb file.
This commit is contained in:
@@ -23,7 +23,6 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/openimsdk/protocol/auth"
|
||||
"github.com/openimsdk/protocol/constant"
|
||||
"github.com/openimsdk/protocol/third"
|
||||
"github.com/openimsdk/tools/errs"
|
||||
)
|
||||
@@ -90,9 +89,8 @@ func (a *Api) apiPost(ctx context.Context, path string, req any, resp any) error
|
||||
|
||||
func (a *Api) GetToken(ctx context.Context) (string, error) {
|
||||
req := auth.UserTokenReq{
|
||||
UserID: a.UserID,
|
||||
Secret: a.Secret,
|
||||
PlatformID: constant.AdminPlatformID,
|
||||
UserID: a.UserID,
|
||||
Secret: a.Secret,
|
||||
}
|
||||
var resp auth.UserTokenResp
|
||||
if err := a.apiPost(ctx, "/auth/user_token", &req, &resp); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user