Path: redb/redb.Templates/templates/redb-identity-app/RedbIdentityApp.Module/Controllers/AdminController.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Templates/templates/redb-identity-app/RedbIdentityApp.Module/Controllers/AdminController.cs
----
using System.Globalization;
using redb.Identity.Contracts.Common;
using redb.Identity.Contracts.Routes;
using redb.Identity.Contracts.Users;
using redb.Route.Controllers.Attributes;
using RedbIdentityApp.Contracts;
using RedbIdentityApp.Module.Identity;
namespace RedbIdentityApp.Module.Controllers;
///
/// Administration: reads Identity's management API in process. Open only to a token that holds the
/// administrative scope, which Identity issues to users of its admin role alone (see IdentitySetup).
/// The management call runs as the module's service client, not as the user: the user's token proves
/// the right, the module does the work.
///
[Route("/api/admin")]
public sealed class AdminController : ApiController
{
public const int PageSize = 20;
/// GET /api/admin/users?page=: Identity's users, a page at a time.
[HttpGet("users")]
public async Task