{"path":"NexusReader.Application/Abstractions/Services/IIdentityService.cs","purpose":"Defines the identity/authentication abstraction for the Application layer: registration, login/logout, profile retrieval, token refresh, and an event for state invalidation.","classification":{"role":"service","layer":"application","confidence":0.9,"evidence":["Service naming pattern","Application/service path heuristic","namespace NexusReader.Application.Abstractions.Services","public interface IIdentityService declares authentication-related operations (RegisterAsync, LoginAsync, LogoutAsync, GetProfileAsync, RefreshTokenAsync) and an OnStateInvalidated event"]},"className":"","methods":[{"name":"OnStateInvalidated","line":8,"endLine":8,"signature":"event Func? OnStateInvalidated -> event","purpose":"Event triggered when identity/authentication state becomes invalid and consumers should react (e.g., clear state or re-authenticate).","calls":[],"actions":[{"id":"event-declaration_8","kind":"mapping","label":"State invalidation event declared","line":8,"detail":"public event Func? OnStateInvalidated; consumers subscribe to be notified asynchronously","visibility":"detail-only","confidence":0.7}]},{"name":"RegisterAsync","line":9,"endLine":9,"signature":"(string email, string password) -> Task","purpose":"Registers a new user account using email and password and returns a success/failure Result.","calls":[],"actions":[{"id":"contract_9","kind":"mapping","label":"Registration operation declared","line":9,"detail":"Asynchronous contract that returns a FluentResults.Result indicating success/failure","visibility":"detail-only","confidence":0.7}]},{"name":"LoginAsync","line":10,"endLine":10,"signature":"(string email, string password, bool rememberMe = false) -> Task","purpose":"Authenticates a user with credentials and optional persistence (rememberMe) and returns a Result.","calls":[],"actions":[{"id":"contract_10","kind":"mapping","label":"Login operation declared","line":10,"detail":"Asynchronous authentication contract returning FluentResults.Result","visibility":"detail-only","confidence":0.7}]},{"name":"LogoutAsync","line":11,"endLine":11,"signature":"() -> Task","purpose":"Logs out the current user and returns a Result indicating success/failure.","calls":[],"actions":[{"id":"contract_11","kind":"mapping","label":"Logout operation declared","line":11,"detail":"Asynchronous logout contract returning FluentResults.Result","visibility":"detail-only","confidence":0.7}]},{"name":"GetProfileAsync","line":12,"endLine":12,"signature":"() -> Task>","purpose":"Retrieves the current user's profile wrapped in a Result with UserProfileDto on success.","calls":[],"actions":[{"id":"contract_12","kind":"mapping","label":"Profile retrieval operation declared","line":12,"detail":"Asynchronous contract returning a typed Result carrying UserProfileDto","visibility":"detail-only","confidence":0.7}]},{"name":"RefreshTokenAsync","line":13,"endLine":13,"signature":"() -> Task","purpose":"Requests a token refresh for the current authentication session and returns a Result indicating success/failure.","calls":[],"actions":[{"id":"contract_13","kind":"mapping","label":"Token refresh operation declared","line":13,"detail":"Asynchronous contract for refreshing authentication tokens","visibility":"detail-only","confidence":0.7}]}],"types":[{"name":"IIdentityService","kind":"interface","line":6,"purpose":"Service contract defining identity/authentication operations and an event for invalidation.","fields":[{"name":"OnStateInvalidated","type":"Func?","required":false,"line":8,"description":"Event invoked when authentication/identity state is invalidated."},{"name":"RegisterAsync","type":"Task","required":true,"line":9,"description":"Register user by email and password."},{"name":"LoginAsync","type":"Task","required":true,"line":10,"description":"Authenticate user with credentials; supports rememberMe flag."},{"name":"LogoutAsync","type":"Task","required":true,"line":11,"description":"Sign out current user."},{"name":"GetProfileAsync","type":"Task>","required":true,"line":12,"description":"Get current user's profile DTO."},{"name":"RefreshTokenAsync","type":"Task","required":true,"line":13,"description":"Refresh authentication token for current session."}]}],"serviceRegistrations":[],"startupActions":[],"dependencies":["NexusReader.Application/DTOs/User/UserProfileDto.cs","FluentResults (external package)"],"patterns":["Service Interface","Dependency Injection"],"domainConcepts":["Identity","Authentication","UserProfile","Session/Token management"],"keyDetails":"This file only declares the IIdentityService interface and an OnStateInvalidated event; concrete implementations elsewhere will perform orchestration, external calls, persistence, and error handling.","orchestrationMethods":[],"typedContracts":[{"name":"IIdentityService","kind":"interface","line":6,"fieldCount":6,"evidencePaths":["NexusReader.Application/Abstractions/Services/IIdentityService.cs"]}],"persistenceInteractions":[],"externalInteractions":[],"evidenceAnchors":[{"kind":"typed-contract","label":"IIdentityService","line":6,"summary":"interface with 6 fields.","confidence":0.8,"evidencePaths":["NexusReader.Application/Abstractions/Services/IIdentityService.cs"]}],"cacheMetadata":{"schemaVersion":2,"analysisVersion":"2026-05-23.cache-v1","contentChecksum":"1fcf664e3e511d2a34bea3fa9bbec2ce5a8e2cb516b5145b80818848205b4a3a","sourceByteSize":485,"analyzedAt":"2026-05-23T16:16:29.571Z","technology":"dotnet"}}