Skip to main content
Version: 🚧 Canary

🆔 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

View Identity Schemas →

⚙️ 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

View Identity Blocks →

🛣️ Routes

HTTP endpoint definitions for identity operations:

  • getIdentityRoute: GET /identities/:identityId with identity retrieval block
  • findIdentitiesRoute: GET /identities with identity search and pagination
  • updateIdentityRoute: PATCH /identities/:identityId with identity update block
  • lockIdentityRoute: POST /identities/:identityId/lock with identity locking block
  • unlockIdentityRoute: POST /identities/:identityId/unlock with identity unlocking block
  • deleteIdentityRoute: DELETE /identities/:identityId with identity deletion block

View Identity Routes →

🚀 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

View Identity Features →

Validators

Validation functions for identity operations:

  • isSelf: Validates that the authenticated user is accessing their own identity resource

View Identity Validators →