Skip to content

Microsoft.AspNet.Identity.Core

reference
1 min readUpdated

Kind: Service

Source: Pams/Core/Pams.Security/Pams.Security.csproj (line 1)

Part of: Pams

NuGet package dependency

Microsoft.AspNet.Identity.Core is a NuGet package dependency referenced by Pams.Security.csproj. It supplies the legacy ASP.NET Identity abstractions used by the security layer for user, role, password, and authentication-related operations.

Diagram

mermaid
sequenceDiagram
    participant Client as TypeScript Client
    participant Api as PAMS API
    participant Security as Pams.Security
    participant Identity as Microsoft.AspNet.Identity.Core
    participant Store as User Store

    Client->>Api: POST /api/auth/login
    Api->>Security: Validate credentials
    Security->>Identity: UserManager.FindAsync(...)
    Identity->>Store: Read user and credentials
    Store-->>Identity: User record
    Identity-->>Security: Authentication result
    Security-->>Api: Create response
    Api-->>Client: Authentication response

Usage

ts
type LoginResponse = {
  accessToken: string;
};

export async function signIn(
  username: string,
  password: string,
): Promise<LoginResponse> {
  const response = await fetch("/api/auth/login", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ username, password }),
  });

  if (!response.ok) {
    throw new Error("Authentication failed.");
  }

  return response.json();
}

AI Coding Instructions

  • Treat Microsoft.AspNet.Identity.Core as a server-side dependency; browser code should call authentication API endpoints instead of referencing Identity types.
  • Keep Identity-related user lookup, password validation, and role checks inside the Pams.Security integration layer.
  • Follow the legacy ASP.NET Identity APIs already used by the project, including UserManager, IUserStore, and related abstractions.
  • Do not mix ASP.NET Core Identity types with Microsoft.AspNet.Identity.Core types without an explicit migration boundary.

Was this page helpful?

Download as PDF