# IdentityManager.AspNetIdentity

**Kind:** Service

**Source:** `Pams/API/Pams.API/Pams.API.csproj` (line 1)

**Part of:** [Pams](subsystem-pams)

NuGet package dependency

IdentityManager.AspNetIdentity is a NuGet package dependency referenced by the Pams.API project. It connects IdentityManager with ASP.NET Identity so the API can expose identity-management behavior through its configured server-side identity store.

## Diagram

```mermaid
flowchart TD
    Client[Client application] --> Api[Pams.API]
    Api --> IdentityManager[IdentityManager]
    IdentityManager --> AspNetIdentity[IdentityManager.AspNetIdentity]
    AspNetIdentity --> IdentityStore[ASP.NET Identity store]
```

## Usage

```ts
type IdentityUser = {
  id: string;
  userName: string;
};

async function getIdentityUsers(
  identityManagementUrl: string,
): Promise<IdentityUser[]> {
  const response = await fetch(`${identityManagementUrl}/users`, {
    headers: {
      Accept: "application/json",
    },
  });

  if (!response.ok) {
    throw new Error("Identity management request failed");
  }

  return response.json();
}

// The API host must configure IdentityManager.AspNetIdentity.
const users = await getIdentityUsers("/identity-management");
console.log(users);
```

## AI Coding Instructions

- Treat IdentityManager.AspNetIdentity as a server-side NuGet dependency; client code should call API endpoints rather than reference the package directly.
- Keep IdentityManager configuration aligned with the ASP.NET Identity user, role, and store types configured by Pams.API.
- Check the project file and package compatibility before changing this dependency because the project uses a legacy package-reference format.
- Avoid assuming identity-management routes are public; preserve the API authorization rules around user and role operations.

## Used by

1 reference from 1 file. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

### Injected or called by (1)

- `Pams.API` — `Pams/API/Pams.API/Pams.API.csproj`:1
