Implement refresh token logic with fingerprint + rotation
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
|
||||
"github.com/authorizerdev/authorizer/server/db"
|
||||
"github.com/authorizerdev/authorizer/server/graph/model"
|
||||
"github.com/authorizerdev/authorizer/server/token"
|
||||
"github.com/authorizerdev/authorizer/server/utils"
|
||||
)
|
||||
|
||||
@@ -18,7 +19,7 @@ func UsersResolver(ctx context.Context) ([]*model.User, error) {
|
||||
return res, err
|
||||
}
|
||||
|
||||
if !utils.IsSuperAdmin(gc) {
|
||||
if !token.IsSuperAdmin(gc) {
|
||||
return res, fmt.Errorf("unauthorized")
|
||||
}
|
||||
|
||||
@@ -28,7 +29,7 @@ func UsersResolver(ctx context.Context) ([]*model.User, error) {
|
||||
}
|
||||
|
||||
for i := 0; i < len(users); i++ {
|
||||
res = append(res, utils.GetResponseUserData(users[i]))
|
||||
res = append(res, users[i].AsAPIUser())
|
||||
}
|
||||
|
||||
return res, nil
|
||||
|
Reference in New Issue
Block a user