AutomationFlowsFinance › Auth Mock Service

Auth Mock Service

Auth Mock Service. Webhook trigger; 8 nodes.

Webhook trigger★★★☆☆ complexity8 nodes
Finance Trigger: Webhook Nodes: 8 Complexity: ★★★☆☆ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "Auth Mock Service",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "GET",
        "path": "api/auth/me",
        "options": {}
      },
      "name": "Get User Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{$json.headers[\"x-acl-auth-key\"]}}",
              "operation": "equal",
              "value2": "acl_live_sec_8f92a3b4"
            }
          ]
        }
      },
      "name": "Security Guard Me",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        200,
        0
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "{\n  \"success\": true,\n  \"data\": {\n    \"id\": \"admin-local\",\n    \"name\": \"Admin Local n8n\",\n    \"email\": \"admin@academicchain.com\",\n    \"role\": \"admin\",\n    \"permissions\": [\"view_dashboard\", \"bulk_issue\", \"manage_users\"]\n  }\n}",
        "options": {}
      },
      "name": "Respond User",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [
        400,
        0
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "{\"error\": \"Unauthorized\", \"message\": \"Invalid or missing security key\"}",
        "options": {
          "responseCode": 401
        }
      },
      "name": "Reject User",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [
        400,
        100
      ]
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "api/auth/login",
        "options": {}
      },
      "name": "Login Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        0,
        300
      ]
    },
    {
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{$json.headers[\"x-acl-auth-key\"]}}",
              "operation": "equal",
              "value2": "acl_live_sec_8f92a3b4"
            }
          ]
        }
      },
      "name": "Security Guard Login",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        200,
        300
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "{\n  \"success\": true,\n  \"token\": \"mock-n8n-token-{{$now.toFormat('yyyyMMdd')}}\",\n  \"user\": {\n    \"id\": \"admin-local\",\n    \"name\": \"Admin Local n8n\",\n    \"email\": \"{{$json.body.email}}\",\n    \"role\": \"admin\"\n  }\n}",
        "options": {}
      },
      "name": "Respond Login",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [
        400,
        300
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "{\"error\": \"Unauthorized\", \"message\": \"Invalid or missing security key\"}",
        "options": {
          "responseCode": 401
        }
      },
      "name": "Reject Login",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [
        400,
        400
      ]
    }
  ],
  "connections": {
    "Get User Webhook": {
      "main": [
        [
          {
            "node": "Security Guard Me",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Security Guard Me": {
      "main": [
        [
          {
            "node": "Respond User",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Reject User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Login Webhook": {
      "main": [
        [
          {
            "node": "Security Guard Login",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Security Guard Login": {
      "main": [
        [
          {
            "node": "Respond Login",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Reject Login",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Auth Mock Service. Webhook trigger; 8 nodes.

Source: https://github.com/Aether-Connect-Labs/AcademicChain-Ledger/blob/main/n8n/workflows/auth-mock.json — original creator credit. Request a take-down →

More Finance workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Finance

This workflow automates the process of recording successful payments from Stripe into QuickBooks by creating corresponding Sales Receipts. It ensures payment data is captured accurately, checks whethe

QuickBooks, Stripe
Finance

This n8n workflow automates the integration between Xero and FileMaker, allowing for seamless data transfer between the two platforms. By listening for webhooks from Xero (e.g., new invoices, payments

Crypto, Move Binary Data, Filemaker
Finance

Integrate Xero with FileMaker using Webhooks. Uses crypto, moveBinaryData, filemaker. Webhook trigger; 11 nodes.

Crypto, Move Binary Data, Filemaker
Finance

Environment Health (AcademicChain). Webhook trigger; 5 nodes.

Finance

Check Accounts Service. Webhook trigger; 8 nodes.