Authing DocsDocuments
Concept
workflow
Guides
Development Integration
Application integration
Concept
workflow
Guides
Development Integration
Application integration
Old Version
Development Integration
  • Single Sign-On (SSO)
  • Login component

  • JavaScript/Node.js

  • Java / Kotlin

  • Python

  • C#

  • PHP

  • Go

    • User authentication module

    • Management module

      • Management resources and permissions
      • Management user
      • Management organization
      • Management role
  • Ruby
  • Android

  • iOS

  • Flutter

  • React Native
  • WeChat Mini Program
  • WeChat webpage authorization
  • Framework Integration
  • Error code
  1. Development Integration
  2. /
  3. Go
  4. /
  5. Management module
  6. /
  7. Management user

¶ Manage user

Update Time: 2025-02-18 09:00:47
Edit

This module can perform user directory to delete, search for users, refresh users token, manage user grouped, manage user roles, manage user policy authorization, etc.

¶ Get user information by ID

management.NewClient(userPoolId, appSecret).Detail(userId)

Get user details through user ID, if you want to get user details with token, use AuthenticationClient SDK .

¶ parameter

  • userId <String> user ID

¶ Example

client := management.NewClient(userPoolId, appSecret)
resp, _ := client.Detail("60a6f9ad5bcccc51834950c5")

¶ return value

  • User

¶ Get a list of users

management.NewClient(userPoolId, appSecret).GetUserList(req)

Get the list of user pool users, the interface is a paging interface

¶ parameter

  • model.QueryListRequest <QueryListRequest>
  • QueryListRequest.Page <int> default: 1
  • QueryListRequest.Limit <int> default: 10
  • QueryListRequest.SortBy <SortByEnum> sorting rules

¶ Example

client := management.NewClient(userPoolId, appSecret)
  req := model.GetRoleListRequest{
    Page:   1,
    Limit:  10,
    SortBy: enum.SortByCreatedAtAsc,
  }
resp, _ := client.GetUserList(req)

¶

¶ Get all the list of users authorized to be authorized

management.NewClient(userPoolId, appSecret).ListAuthorizedResources(req)

Gets all resources authorized by users, and users are authorized to include resources that are inherited from roles, packets, and organizational institutions.

¶ parameter

  • req <model.ListUserAuthorizedResourcesRequest> Get all resource list parameters objects authorized by the user.
  • req.UserId <String> User ID。
  • req.Namespace <String> Permission group code, please seeUse Right Limit Group Management Rights Resources.
  • req.ResourceType <String> resource Type.

¶ Example

client := NewClient(userPoolId, appSecret)
req := model.ListUserAuthorizedResourcesRequest{
  UserId:       "611b2ff477d701441c25e29e",
  Namespace:    "6123528118b7794b2420b311",
  ResourceType: nil,
}
resp, _ := client.ListAuthorizedResources(req)

¶ Sample data

  • type for resource types, there are several of the following resources types
    • DATA: type of data;
    • API: API type of data;
    • MENU: Menu type data;
    • BUTTON: Button type data;
  • code: Resource descriptor, if it is DATA type resource, format is resourceType:resourceId, such as books:* Represents all books,books:1 indicates a book for ID 1.
  • actions: The user is authorized to operate the resource.
{
  "totalCount": 12,
  "list": [
    {
      "code": "menu_a",
      "type": "MENU"
    },
    {
      "code": "menu_b",
      "type": "MENU"
    },
    {
      "code": "books:1",
      "type": "DATA",
      "actions": ["books:delete", "books:update"]
    }
  ]
}

¶

Prev: Management resources and permissions Next: Management organization
  • Get user information by ID
  • Get a list of users
  • Get all the list of users authorized to be authorized

User identity management

Integrated third-party login
Mobile phone number flash check (opens new window)
Universal login form component
Custom authentication process

Enterprise internal management

Single Sign On
Multi-factor Authentication
Authority Management

Developers

Development Document
Framework Integration
Blog (opens new window)
GitHub (opens new window)
Community User Center (opens new window)

Company

400 888 2106
sales@authing.cn
16 / F, Block B, NORTH STAR CENTURY CENTER, Beijing(Total)
room 406, 4th floor, zone B, building 1, No. 200, Tianfu Fifth Street, Chengdu(branch)

Beijing ICP No.19051205-1

© Beijing Steamory Technology Co.