🆔 Identity Blocks
Identity blocks provide comprehensive functionality for identity management in NodeBlocks applications. These blocks handle complete identity lifecycle operations including retrieval, updates, search, deletion, and security management (lock/unlock) with pure business logic functions.
🎯 Overview
Identity blocks are designed to:
- Manage identity lifecycle with full CRUD operations
- Provide security management with account lock/unlock functionality
- Provide pure business logic separated from HTTP concerns
- Enable easy composition into complete services
📦 Block Types
🔍 Schemas
JSON Schema definitions for identity data validation:
- identityIdPathParameter: Base identity ID path parameter
- getIdentitySchema: Identity retrieval validation
- findIdentitySchema: Identity search with filtering and pagination
- findByIdentityIdSchema: Identity retrieval by ID with pagination validation
- updateIdentitySchema: Identity update validation
- lockIdentitySchema: Identity locking validation
- unlockIdentitySchema: Identity unlocking validation
- deleteIdentitySchema: Identity deletion validation
⚙️ Blocks
Pure business logic functions for identity operations:
- getIdentityById: Identity data retrieval
- findIdentities: Identity search with filtering and pagination
- updateIdentity: Identity updates
- buildIdentityIdFilter: Identity ID filter object creation for database queries
- buildLockIdentityPayload: Lock payload creation
- buildUnlockIdentityPayload: Unlock payload creation
- deleteIdentity: Identity deletion
- deleteIdentityTerminator: Response formatting for identity deletion operations
🛣️ Routes
HTTP endpoint definitions for identity operations:
- getIdentityRoute: GET
/identities/:identityIdwith identity retrieval block - findIdentitiesRoute: GET
/identitieswith identity search and pagination - updateIdentityRoute: PATCH
/identities/:identityIdwith identity update block - lockIdentityRoute: POST
/identities/:identityId/lockwith identity locking block - unlockIdentityRoute: POST
/identities/:identityId/unlockwith identity unlocking block - deleteIdentityRoute: DELETE
/identities/:identityIdwith identity deletion block
🚀 Features
Complete identity management features combining schemas, routes, and blocks:
- getIdentityFeature: Identity retrieval with validation
- findIdentitiesFeature: Identity search and listing with pagination
- updateIdentityFeature: Identity updates with authorization
- lockIdentityFeature: Identity locking with security controls
- unlockIdentityFeature: Identity unlocking with access restoration
- deleteIdentityFeature: Identity deletion with access control
✅ Validators
Validation functions for identity operations:
- isSelf: Validates that the authenticated user is accessing their own identity resource
🔗 Related Documentation
- Identity Schemas - Identity data validation and contracts
- Identity Blocks - Identity business logic functions
- Identity Routes - HTTP endpoint definitions
- Identity Features - Complete identity management features
- Identity Validators - Identity validation functions