# middleware

Published articles for middleware.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Classify Domain and System Errors to Set HTTP Status, Logging, and Paging

DevFeed: [Classify Domain and System Errors to Set HTTP Status, Logging, and Paging](<https://devfeed.tech/articles/stop-throwing-new-error-it-s-lying-to-your-logs-18109.md>)

Original publisher: [Read original article](<https://thetshaped.dev/p/domain-errors-are-features-system-errors-are-bugs-error-handling>)

Author: The T-Shaped Dev

Published: 2026-08-29T04:19:38Z

Content type: tutorial

Language: en

Sources: [The T-Shaped Dev](<https://devfeed.tech/sources/the-t-shaped-dev.md>)

Topics: [Code](<https://devfeed.tech/topics/code.md>), [HTTP](<https://devfeed.tech/topics/http.md>), [API](<https://devfeed.tech/topics/api.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [code](<https://devfeed.tech/tags/code.md>), [errors](<https://devfeed.tech/tags/errors.md>), [graphql](<https://devfeed.tech/tags/graphql.md>), [http](<https://devfeed.tech/tags/http.md>), [logs](<https://devfeed.tech/tags/logs.md>), [middleware](<https://devfeed.tech/tags/middleware.md>), [on-call](<https://devfeed.tech/tags/on-call.md>)

### AI overview

This tutorial distinguishes expected domain errors, such as invalid input or forbidden actions, from unexpected system errors, such as database failures, upstream timeouts, and memory exhaustion. It proposes encoding the distinction in error types so middleware can determine the HTTP status, user message, log level, and paging behavior.

### Source excerpt

One distinction that sets your HTTP status, your log level, and who gets paged. (6 min)

## A Starlette middleware guide for FastAPI and Python developers

DevFeed: [A Starlette middleware guide for FastAPI and Python developers](<https://devfeed.tech/articles/a-starlette-middleware-guide-for-fastapi-and-python-developers-20057.md>)

Original publisher: [Read original article](<https://www.honeybadger.io/blog/starlette-middleware/>)

Author: Aditya Raj

Published: 2026-08-28T07:00:00Z

Content type: tutorial

Language: en

Sources: [Honeybadger](<https://devfeed.tech/sources/honeybadger.md>)

Topics: [FastAPI](<https://devfeed.tech/topics/fastapi.md>), [Python](<https://devfeed.tech/topics/python.md>), [ASGI](<https://devfeed.tech/topics/asgi.md>), [web applications](<https://devfeed.tech/topics/web-applications.md>), [Cross-origin resource sharing (CORS)](<https://devfeed.tech/topics/cors.md>)

Tags: [auth](<https://devfeed.tech/tags/auth.md>), [cors](<https://devfeed.tech/tags/cors.md>), [developers](<https://devfeed.tech/tags/developers.md>), [fastapi](<https://devfeed.tech/tags/fastapi.md>), [guide](<https://devfeed.tech/tags/guide.md>), [logging](<https://devfeed.tech/tags/logging.md>), [middleware](<https://devfeed.tech/tags/middleware.md>), [python](<https://devfeed.tech/tags/python.md>), [python-articles](<https://devfeed.tech/tags/python-articles.md>), [starlette](<https://devfeed.tech/tags/starlette.md>), [web-applications](<https://devfeed.tech/tags/web-applications.md>)

### AI overview

This guide explains how middleware works in Starlette and FastAPI applications. It covers built-in middleware, custom middleware using pure ASGI and BaseHTTPMiddleware, and execution order when multiple middleware layers process requests and responses.

### Source excerpt

Starlette middlewares let you apply logging, auth, and CORS across every route in a web app without duplicating code. This article covers Starlette's built-in middlewares, building custom ones with pure ASGI and BaseHTTPMiddleware, and the execution-order rules that keep your FastAPI applications secure and fast. Read on to learn how to build and order Starlette middlewares the right way.

## How to add enterprise SSO to an Express.js API

DevFeed: [How to add enterprise SSO to an Express.js API](<https://devfeed.tech/articles/how-to-add-enterprise-sso-to-an-express-js-api-16016.md>)

Original publisher: [Read original article](<https://workos.com/blog/how-to-add-enterprise-sso-express-js-api>)

Author: WorkOS

Published: 2026-08-21T00:00:00Z

Content type: tutorial

Language: en

Sources: [WorkOS Blog](<https://devfeed.tech/sources/workos-blog.md>)

Topics: [Single sign-on (SSO)](<https://devfeed.tech/topics/sso.md>), [Tutorial](<https://devfeed.tech/topics/tutorial.md>), [Express](<https://devfeed.tech/topics/express.md>), [Node.js](<https://devfeed.tech/topics/node-js.md>), [API](<https://devfeed.tech/topics/api.md>), [JSON Web Tokens](<https://devfeed.tech/topics/jwt.md>), [OpenID connect (OIDC)](<https://devfeed.tech/topics/oidc.md>), [Authorization](<https://devfeed.tech/topics/authorization.md>), [Back end](<https://devfeed.tech/topics/backend.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [authorization](<https://devfeed.tech/tags/authorization.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [js](<https://devfeed.tech/tags/js.md>), [jwt](<https://devfeed.tech/tags/jwt.md>), [middleware](<https://devfeed.tech/tags/middleware.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [oidc](<https://devfeed.tech/tags/oidc.md>), [security](<https://devfeed.tech/tags/security.md>), [sso](<https://devfeed.tech/tags/sso.md>)

### AI overview

A step-by-step tutorial for adding enterprise SSO to an Express.js API with WorkOS. It covers SAML and OIDC login redirects, callback handling, JWT verification on protected routes, and multi-tenant authorization using signed token claims.

### Source excerpt

Add enterprise SSO (SAML and OIDC) to an Express.js API with WorkOS. Step-by-step Node.js code for the login redirect, the callback, and JWT verification on protected API routes.

## wasmCloud 2.2.0: TLS for WebAssembly, customizable HTTP egress

DevFeed: [wasmCloud 2.2.0: TLS for WebAssembly, customizable HTTP egress](<https://devfeed.tech/articles/wasmcloud-2-2-0-tls-for-webassembly-customizable-http-egress-15438.md>)

Original publisher: [Read original article](<https://wasmcloud.com/blog/wasmcloud-2-2-0-release/>)

Author: Eric Gregory

Published: 2026-05-21T00:00:00Z

Content type: release

Language: en

Sources: [wasmCloud Blog](<https://devfeed.tech/sources/wasmcloud-blog.md>)

Topics: [WebAssembly](<https://devfeed.tech/topics/web-assembly.md>), [HTTP](<https://devfeed.tech/topics/http.md>), [TLS (Transport Layer Security)](<https://devfeed.tech/topics/tls.md>)

Tags: [config](<https://devfeed.tech/tags/config.md>), [handler](<https://devfeed.tech/tags/handler.md>), [hardening](<https://devfeed.tech/tags/hardening.md>), [http](<https://devfeed.tech/tags/http.md>), [middleware](<https://devfeed.tech/tags/middleware.md>), [release](<https://devfeed.tech/tags/release.md>), [rpc](<https://devfeed.tech/tags/rpc.md>), [tls](<https://devfeed.tech/tags/tls.md>), [wasi](<https://devfeed.tech/tags/wasi.md>), [webassembly](<https://devfeed.tech/tags/webassembly.md>)

### AI overview

wasmCloud 2.2.0 adds native TLS for WebAssembly components through WASI Preview 3, a pluggable HTTP egress handler, an expanded wash config command, and runtime-operator hardening. The release also supports customizable TLS providers and embedder-controlled outbound request handling.

### Source excerpt

wasmCloud 2.2.0 brings WASI Preview 3 TLS to WebAssembly components, a pluggable OutgoingHandler trait for HTTP egress, an expanded wash config command, and runtime-operator hardening.

## Khronos Adds Middleware Insights to the OpenXR Extension Matrix

DevFeed: [Khronos Adds Middleware Insights to the OpenXR Extension Matrix](<https://devfeed.tech/articles/khronos-adds-middleware-insights-to-the-openxr-extension-matrix-15111.md>)

Original publisher: [Read original article](<https://www.khronos.org/blog/khronos-adds-middleware-insights-to-the-openxr-extension-matrix>)

Author: jphilips (jeff@khronosgroup.org)

Published: 2026-04-07T13:00:00Z

Content type: article

Language: en

Sources: [Blogs Khronos Blog](<https://devfeed.tech/sources/blogs-khronos-blog.md>)

Topics: [Extension](<https://devfeed.tech/topics/extension.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [blog](<https://devfeed.tech/tags/blog.md>), [component](<https://devfeed.tech/tags/component.md>), [developers](<https://devfeed.tech/tags/developers.md>), [extension](<https://devfeed.tech/tags/extension.md>), [improvements](<https://devfeed.tech/tags/improvements.md>), [insights](<https://devfeed.tech/tags/insights.md>), [middleware](<https://devfeed.tech/tags/middleware.md>), [openxr](<https://devfeed.tech/tags/openxr.md>), [visibility](<https://devfeed.tech/tags/visibility.md>)

### AI overview

The Khronos OpenXR working group expanded its Extension Matrix with self-reported support data from middleware providers. The update gives developers more visibility into extension availability across the XR stack, while support may still vary by runtime and device.

### Source excerpt

The Khronos OpenXR working group has expanded its Extension Matrix to include self-reported data from middleware providers. Developers now have a clearer view of what's available across the broader XR stack.

## Express, Koa, Meteor, and Sails.js: A Practical Node.js Framework Comparison

DevFeed: [Express, Koa, Meteor, and Sails.js: A Practical Node.js Framework Comparison](<https://devfeed.tech/articles/express-koa-meteor-and-sails-js-a-practical-node-js-framework-comparison-17757.md>)

Original publisher: [Read original article](<https://talent500.com/blog/express-koa-meteor-sails-nodejs-framework-comparison/>)

Author: Prachi Kothiyal

Published: 2026-02-09T05:43:49Z

Content type: comparison

Language: en

Sources: [Backend Archives | Talent500 blog](<https://devfeed.tech/sources/backend-archives-talent500-blog.md>)

Topics: [Express](<https://devfeed.tech/topics/express.md>), [Framework](<https://devfeed.tech/topics/framework.md>), [Node.js](<https://devfeed.tech/topics/node-js.md>), [Koa](<https://devfeed.tech/topics/koa.md>), [Meteor](<https://devfeed.tech/topics/meteor.md>), [Development](<https://devfeed.tech/topics/development.md>), [web applications](<https://devfeed.tech/topics/web-applications.md>), [Scalability](<https://devfeed.tech/topics/scalability.md>)

Tags: [backend](<https://devfeed.tech/tags/backend.md>), [choosing-the-right-framework](<https://devfeed.tech/tags/choosing-the-right-framework.md>), [comparison](<https://devfeed.tech/tags/comparison.md>), [development](<https://devfeed.tech/tags/development.md>), [express](<https://devfeed.tech/tags/express.md>), [express-minimal-and-ubiquitous](<https://devfeed.tech/tags/express-minimal-and-ubiquitous.md>), [framework](<https://devfeed.tech/tags/framework.md>), [frameworks](<https://devfeed.tech/tags/frameworks.md>), [full-stack-development](<https://devfeed.tech/tags/full-stack-development.md>), [http](<https://devfeed.tech/tags/http.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [js](<https://devfeed.tech/tags/js.md>), [koa-modern-syntax-and-cleaner-async-flow](<https://devfeed.tech/tags/koa-modern-syntax-and-cleaner-async-flow.md>), [meteor-full-stack-real-time-and-highly-opinionated](<https://devfeed.tech/tags/meteor-full-stack-real-time-and-highly-opinionated.md>), [middleware](<https://devfeed.tech/tags/middleware.md>), [newsletters](<https://devfeed.tech/tags/newsletters.md>), [node](<https://devfeed.tech/tags/node.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [sails-js-mvc-structure-and-real-time-capabilities](<https://devfeed.tech/tags/sails-js-mvc-structure-and-real-time-capabilities.md>), [scalability](<https://devfeed.tech/tags/scalability.md>)

### AI overview

This comparison examines Express, Koa, Meteor, and Sails.js in the Node.js ecosystem, focusing on what each framework does best and how teams might choose among them based on project requirements, team experience, and long-term scalability. It describes Express as minimal and flexible, while Koa emphasizes lightweight design and cleaner asynchronous control flow.

### Source excerpt

As JavaScript has expanded from browser-only scripting to full-stack development, Node.js has become a core platform for building modern web [...] The post Express, Koa, Meteor, and Sails.js: A Practical Node.js Framework Comparison appeared first on Talent500 blog.

## Custom Middleware in Encore.ts

DevFeed: [Custom Middleware in Encore.ts](<https://devfeed.tech/articles/custom-middleware-in-encore-ts-17785.md>)

Original publisher: [Read original article](<https://encore.dev/blog/custom-middleware>)

Author: Marcus Kohlberg

Published: 2024-12-09T00:00:00Z

Content type: release

Language: en

Sources: [Encore Updates](<https://devfeed.tech/sources/encore-updates.md>)

Topics: [API](<https://devfeed.tech/topics/api.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [Authentication](<https://devfeed.tech/topics/authentication.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [authentication](<https://devfeed.tech/tags/authentication.md>), [launch](<https://devfeed.tech/tags/launch.md>), [middleware](<https://devfeed.tech/tags/middleware.md>)

### AI overview

Encore.ts now supports custom middleware that can be attached to specific services and API endpoints. Middleware runs in definition order, can inspect requests and modify responses, and can enforce rules before and after API handlers execute.

### Source excerpt

Launch Week Day 1

## AWS API Gateway's Request Validation: Navigating the Quirks

DevFeed: [AWS API Gateway's Request Validation: Navigating the Quirks](<https://devfeed.tech/articles/aws-api-gateway-s-request-validation-navigating-the-quirks-23894.md>)

Original publisher: [Read original article](<https://medium.com/smg-real-estate/aws-api-gateways-request-validation-navigating-the-quirks-38285cb0a1c1?source=rss----2186e5b9bd8f---4>)

Author: Thomas Klein

Published: 2024-08-09T12:07:11Z

Content type: tutorial

Language: en

Sources: [Homegate Engineering Blog - Medium](<https://devfeed.tech/sources/homegate-engineering-blog-medium.md>)

Topics: [Amazon API Gateway](<https://devfeed.tech/topics/amazon-api-gateway.md>), [Amazon Web Services](<https://devfeed.tech/topics/aws.md>), [API](<https://devfeed.tech/topics/api.md>), [gateway](<https://devfeed.tech/topics/gateway.md>), [JSON Schema](<https://devfeed.tech/topics/json-schema.md>), [TypeScript](<https://devfeed.tech/topics/typescript.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [enum](<https://devfeed.tech/topics/enum.md>), [HTTP](<https://devfeed.tech/topics/http.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [api-gateway](<https://devfeed.tech/tags/api-gateway.md>), [aws](<https://devfeed.tech/tags/aws.md>), [aws-api-gateway](<https://devfeed.tech/tags/aws-api-gateway.md>), [aws-lambda](<https://devfeed.tech/tags/aws-lambda.md>), [enum](<https://devfeed.tech/tags/enum.md>), [gateway](<https://devfeed.tech/tags/gateway.md>), [handler](<https://devfeed.tech/tags/handler.md>), [http](<https://devfeed.tech/tags/http.md>), [json](<https://devfeed.tech/tags/json.md>), [json-schema](<https://devfeed.tech/tags/json-schema.md>), [middleware](<https://devfeed.tech/tags/middleware.md>), [middy](<https://devfeed.tech/tags/middy.md>), [tests](<https://devfeed.tech/tags/tests.md>), [type-safety](<https://devfeed.tech/tags/type-safety.md>), [typescript](<https://devfeed.tech/tags/typescript.md>), [validation](<https://devfeed.tech/tags/validation.md>), [zod](<https://devfeed.tech/tags/zod.md>)

### AI overview

This tutorial examines AWS API Gateway request validation. It explains that query-parameter presence is checked, but enum values may not be enforced, while POST and PUT payloads are validated with JSON Schema Draft 4. It also discusses generic error messages and TypeScript-based validation approaches.

### Source excerpt

AWS API Gateway's request validation follows a specific set of rules that developers should be aware of when setting up their APIs. While it offers some validation features, it's important to understand its scope and limitations. Let's examine how it works with a common API configuration: parameters: - name: offerType in: query required: true description: RENT or BUY schema: type: string enum: - RENT - BUY With this configuration, API Gateway diligently checks for the presence of the query parameter, returning an HTTP 400 error if it's missing. However, it falls short when it comes to validating the actual value. Surprisingly, it would accept "KERMIT" without batting an eye, despite the clear enum specification. This behavior, while documented, can be a source of frustration for developers expecting more comprehensive validation. Interestingly, API Gateway shows more validation prowess with POST and PUT requests. It validates request payloads using JSON Schema Draft 4, demonstrating a somewhat inconsistent approach to input validation across different HTTP methods. Even when it does catch an error, API Gateway's feedback is less than illuminating. Instead of specific error details, you're met with a generic {"message": "Invalid request body"}. For more information, you'll need to dig into the associated log streams, which isn't ideal for surfacing error details in API responses. Example output in AWS console from a failed request validation when a body request validator is setup. API Gateway's validation is handy, but it leaves a lot to be desired. Developers often need to add extra checks for a truly robust API. While API Gateway supports various integrations and Lambda languages, let's focus on TypeScript. TypeScript's strong typing and runtime checks can catch issues early, sparing your users from cryptic error messages. Let's explore how to use this to make your API smarter and your users happier. Option 1: DIY Validation (AKA The "I've Got Trust Issues" Approac

## Ep. 12: Implementing Robust Transaction Handling in Go

DevFeed: [Ep. 12: Implementing Robust Transaction Handling in Go](<https://devfeed.tech/articles/ep-12-implementing-robust-transaction-handling-in-go-22252.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2024/07/implementing-robust-transaction-handling-in-go-ep-12.html>)

Published: 2024-08-05T00:00:00Z

Content type: tutorial

Language: en

Sources: [William Kennedy](<https://devfeed.tech/sources/william-kennedy.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [Transactions](<https://devfeed.tech/topics/transactions.md>), [Database](<https://devfeed.tech/topics/database.md>), [Software Engineering](<https://devfeed.tech/topics/software-engineering.md>), [interfaces](<https://devfeed.tech/topics/interfaces.md>), [Authentication](<https://devfeed.tech/topics/authentication.md>), [Authorization](<https://devfeed.tech/topics/authorization.md>), [context](<https://devfeed.tech/topics/context.md>), [Logging](<https://devfeed.tech/topics/logging.md>), [configuration](<https://devfeed.tech/topics/configuration.md>)

Tags: [advanced-transaction-management-go](<https://devfeed.tech/tags/advanced-transaction-management-go.md>), [atomic-database-operations-go](<https://devfeed.tech/tags/atomic-database-operations-go.md>), [authentication](<https://devfeed.tech/tags/authentication.md>), [authorization](<https://devfeed.tech/tags/authorization.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [configuring-transaction-middleware-go](<https://devfeed.tech/tags/configuring-transaction-middleware-go.md>), [context](<https://devfeed.tech/tags/context.md>), [database](<https://devfeed.tech/tags/database.md>), [database-transactions-in-go](<https://devfeed.tech/tags/database-transactions-in-go.md>), [flexible-transaction-management-go](<https://devfeed.tech/tags/flexible-transaction-management-go.md>), [go](<https://devfeed.tech/tags/go.md>), [go-authentication-authorization-middleware](<https://devfeed.tech/tags/go-authentication-authorization-middleware.md>), [go-data-integrity-consistency](<https://devfeed.tech/tags/go-data-integrity-consistency.md>), [go-middleware-integration](<https://devfeed.tech/tags/go-middleware-integration.md>), [go-request-handling-transactions](<https://devfeed.tech/tags/go-request-handling-transactions.md>), [go-transaction-handling](<https://devfeed.tech/tags/go-transaction-handling.md>), [go-transaction-middleware](<https://devfeed.tech/tags/go-transaction-middleware.md>), [go-transaction-rollback-commit](<https://devfeed.tech/tags/go-transaction-rollback-commit.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [logging](<https://devfeed.tech/tags/logging.md>), [logging-transaction-operations-go](<https://devfeed.tech/tags/logging-transaction-operations-go.md>), [middleware](<https://devfeed.tech/tags/middleware.md>), [middleware-functions-integration-go](<https://devfeed.tech/tags/middleware-functions-integration-go.md>), [reliable-go-applications](<https://devfeed.tech/tags/reliable-go-applications.md>), [scalable-software-systems-go](<https://devfeed.tech/tags/scalable-software-systems-go.md>), [secure-data-transactions-go](<https://devfeed.tech/tags/secure-data-transactions-go.md>), [transaction-context-handling-go](<https://devfeed.tech/tags/transaction-context-handling-go.md>), [transaction-interfaces-go](<https://devfeed.tech/tags/transaction-interfaces-go.md>), [transaction-management](<https://devfeed.tech/tags/transaction-management.md>), [transaction-management-in-go](<https://devfeed.tech/tags/transaction-management-in-go.md>), [transactions](<https://devfeed.tech/tags/transactions.md>)

### AI overview

Episode 12 explains how to implement transaction management in Go using middleware, interfaces, context, logging, and database operations. It covers committing successful operations, rolling back on errors, maintaining atomicity, and integrating transaction handling with authentication and authorization middleware.

### Source excerpt

Introduction: Welcome to Episode 12 of our Ultimate Software Design series! In this final installment, Bill guides us through the advanced implementation of transaction management in Go, ensuring robust and consistent data operations within applications. By focusing on middleware integration, Bill provides a comprehensive strategy for handling database transactions, committing successful operations, and rolling back when errors occur. Learn to configure and log transaction middleware for tracking commits and rollbacks.'

## Ep. 10: Building Secure Go Systems: Key Management, Middleware, and Error Handling

DevFeed: [Ep. 10: Building Secure Go Systems: Key Management, Middleware, and Error Handling](<https://devfeed.tech/articles/ep-10-building-secure-go-systems-key-management-middleware-and-error-handling-22247.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2024/07/building-secure-go-systems-key-management-middleware-and-error-handling-ep-10.html>)

Published: 2024-07-23T00:00:00Z

Content type: tutorial

Language: en

Sources: [William Kennedy](<https://devfeed.tech/sources/william-kennedy.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [Authentication](<https://devfeed.tech/topics/authentication.md>), [Authorization](<https://devfeed.tech/topics/authorization.md>), [Access Control](<https://devfeed.tech/topics/access-control.md>), [Security](<https://devfeed.tech/topics/security.md>), [Software Engineering](<https://devfeed.tech/topics/software-engineering.md>)

Tags: [access-control](<https://devfeed.tech/tags/access-control.md>), [authentication](<https://devfeed.tech/tags/authentication.md>), [authentication-in-go](<https://devfeed.tech/tags/authentication-in-go.md>), [authentication-middleware-go](<https://devfeed.tech/tags/authentication-middleware-go.md>), [authorization](<https://devfeed.tech/tags/authorization.md>), [authorization-in-go](<https://devfeed.tech/tags/authorization-in-go.md>), [authorization-middleware-go](<https://devfeed.tech/tags/authorization-middleware-go.md>), [best-practices-for-go-security](<https://devfeed.tech/tags/best-practices-for-go-security.md>), [building-secure-go-systems](<https://devfeed.tech/tags/building-secure-go-systems.md>), [centralized-error-handling-go](<https://devfeed.tech/tags/centralized-error-handling-go.md>), [context](<https://devfeed.tech/tags/context.md>), [context-management-go](<https://devfeed.tech/tags/context-management-go.md>), [cryptographic](<https://devfeed.tech/tags/cryptographic.md>), [cryptographic-keys-go](<https://devfeed.tech/tags/cryptographic-keys-go.md>), [docker-deployment-go-security](<https://devfeed.tech/tags/docker-deployment-go-security.md>), [error-handling](<https://devfeed.tech/tags/error-handling.md>), [go](<https://devfeed.tech/tags/go.md>), [go-application-security](<https://devfeed.tech/tags/go-application-security.md>), [go-authentication-and-authorization](<https://devfeed.tech/tags/go-authentication-and-authorization.md>), [go-authentication-strategies](<https://devfeed.tech/tags/go-authentication-strategies.md>), [go-authorization-strategies](<https://devfeed.tech/tags/go-authorization-strategies.md>), [go-error-handling-best-practices](<https://devfeed.tech/tags/go-error-handling-best-practices.md>), [go-error-management](<https://devfeed.tech/tags/go-error-management.md>), [go-key-management](<https://devfeed.tech/tags/go-key-management.md>), [go-middleware-functions](<https://devfeed.tech/tags/go-middleware-functions.md>), [go-request-handling-pipeline](<https://devfeed.tech/tags/go-request-handling-pipeline.md>), [go-software-security](<https://devfeed.tech/tags/go-software-security.md>), [go-token-handling](<https://devfeed.tech/tags/go-token-handling.md>), [keystore-integration-go](<https://devfeed.tech/tags/keystore-integration-go.md>), [managing-cryptographic-keys-in-go](<https://devfeed.tech/tags/managing-cryptographic-keys-in-go.md>), [middleware](<https://devfeed.tech/tags/middleware.md>), [middleware-in-go-applications](<https://devfeed.tech/tags/middleware-in-go-applications.md>), [role-based-access-control-go](<https://devfeed.tech/tags/role-based-access-control-go.md>), [secure-go-applications](<https://devfeed.tech/tags/secure-go-applications.md>), [secure-go-deployment](<https://devfeed.tech/tags/secure-go-deployment.md>), [secure-go-systems](<https://devfeed.tech/tags/secure-go-systems.md>), [token-parsing-go](<https://devfeed.tech/tags/token-parsing-go.md>), [user-id-extraction-go](<https://devfeed.tech/tags/user-id-extraction-go.md>)

### AI overview

Episode 10 of a Go software design series explains how to build secure systems by managing cryptographic keys with a KeyStore, adding authentication and authorization middleware, enforcing role-based access control, and centralizing error handling and request context management.

### Source excerpt

Introduction: Welcome to Episode 10 of our Ultimate Software Design series! In this episode, Bill dives into the integration of authentication and authorization mechanisms within Go packages, providing developers with essential strategies for securing and maintaining their software systems. Learn to configure and manage cryptographic keys using a KeyStore and integrate it into your Go applications. Discover how to create middleware functions for token parsing, user ID extraction, and role-based access control.

## Preventing broken access control in express Node.js applications

DevFeed: [Preventing broken access control in express Node.js applications](<https://devfeed.tech/articles/preventing-broken-access-control-in-express-node-js-applications-8049.md>)

Original publisher: [Read original article](<https://snyk.io/blog/preventing-broken-access-control-express-node-js/>)

Author: Ben Smitthimedhin

Published: 2024-05-22T05:00:00Z

Content type: article

Language: en

Sources: [Blog RSS Feed | Snyk](<https://devfeed.tech/sources/blog-rss-feed-snyk.md>)

Topics: [Access Control](<https://devfeed.tech/topics/access-control.md>), [Express](<https://devfeed.tech/topics/express.md>), [Node.js](<https://devfeed.tech/topics/node-js.md>), [Vulnerabilities](<https://devfeed.tech/topics/vulnerabilities.md>), [Authorization](<https://devfeed.tech/topics/authorization.md>), [web applications](<https://devfeed.tech/topics/web-applications.md>), [Back end](<https://devfeed.tech/topics/backend.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [access-control](<https://devfeed.tech/tags/access-control.md>), [acquisition](<https://devfeed.tech/tags/acquisition.md>), [authorization](<https://devfeed.tech/tags/authorization.md>), [backend](<https://devfeed.tech/tags/backend.md>), [blog](<https://devfeed.tech/tags/blog.md>), [code](<https://devfeed.tech/tags/code.md>), [code-security](<https://devfeed.tech/tags/code-security.md>), [developer](<https://devfeed.tech/tags/developer.md>), [draftdotdev](<https://devfeed.tech/tags/draftdotdev.md>), [express](<https://devfeed.tech/tags/express.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [js](<https://devfeed.tech/tags/js.md>), [middleware](<https://devfeed.tech/tags/middleware.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [open-source-security](<https://devfeed.tech/tags/open-source-security.md>), [snyk-code](<https://devfeed.tech/tags/snyk-code.md>), [snyk-open-source](<https://devfeed.tech/tags/snyk-open-source.md>), [vulnerabilities](<https://devfeed.tech/tags/vulnerabilities.md>), [vulnerability](<https://devfeed.tech/tags/vulnerability.md>), [web-applications](<https://devfeed.tech/tags/web-applications.md>)

### AI overview

This article explains broken access control in backend Node.js applications built with Express. It describes how flawed authorization rules can expose private data, permit restricted actions, or allow privilege escalation, and introduces code examples of vertical access control vulnerabilities such as unprotected administrative routes.

### Source excerpt

In this article, you'll learn more about broken access control in Node.js applications and strategies to prevent such vulnerabilities when building web applications based on the Express web framework.

## Mission Control -- Web

DevFeed: [Mission Control -- Web](<https://devfeed.tech/articles/mission-control-web-33508.md>)

Original publisher: [Read original article](<https://dev.37signals.com/mission-control-web/>)

Author: Lewis Buckley

Published: 2024-05-09T17:00:00Z

Content type: release

Language: en

Sources: [37signals Dev](<https://devfeed.tech/sources/37signals-dev.md>)

Topics: [Rails](<https://devfeed.tech/topics/rails.md>), [Redis](<https://devfeed.tech/topics/redis.md>), [Web](<https://devfeed.tech/topics/web.md>)

Tags: [github](<https://devfeed.tech/tags/github.md>), [middleware](<https://devfeed.tech/tags/middleware.md>), [new-features](<https://devfeed.tech/tags/new-features.md>), [rails](<https://devfeed.tech/tags/rails.md>), [redis](<https://devfeed.tech/tags/redis.md>)

### AI overview

37signals announces the open-sourcing of Mission Control -- Web, a Rails tool for controlling web requests during incidents. It uses an admin dashboard and middleware backed by Redis to deny requests to configured paths, with version 0.2.0 available.

### Source excerpt

Deny requests to your Rails app.

## How to migrate your self-hosted service to Temporal Cloud

DevFeed: [How to migrate your self-hosted service to Temporal Cloud](<https://devfeed.tech/articles/how-to-migrate-your-self-hosted-service-to-temporal-cloud-35868.md>)

Original publisher: [Read original article](<https://temporal.io/blog/how-to-migrate-your-self-hosted-service-to-temporal-cloud>)

Author: Meagan Speare

Published: 2024-04-17T04:00:00Z

Content type: tutorial

Language: en

Sources: [Temporal Blog](<https://devfeed.tech/sources/temporal-blog.md>)

Topics: [Cloud](<https://devfeed.tech/topics/cloud.md>), [migration](<https://devfeed.tech/topics/migration.md>), [Self-hosted](<https://devfeed.tech/topics/self-hosted.md>), [Scalability](<https://devfeed.tech/topics/scalability.md>), [Availability](<https://devfeed.tech/topics/availability.md>), [Latency](<https://devfeed.tech/topics/latency.md>), [API](<https://devfeed.tech/topics/api.md>), [API keys](<https://devfeed.tech/topics/api-keys.md>), [Encryption](<https://devfeed.tech/topics/encryption.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [api-keys](<https://devfeed.tech/tags/api-keys.md>), [availability](<https://devfeed.tech/tags/availability.md>), [cloud](<https://devfeed.tech/tags/cloud.md>), [encryption](<https://devfeed.tech/tags/encryption.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [latency](<https://devfeed.tech/tags/latency.md>), [middleware](<https://devfeed.tech/tags/middleware.md>), [migrate](<https://devfeed.tech/tags/migrate.md>), [scalability](<https://devfeed.tech/tags/scalability.md>), [self-hosted](<https://devfeed.tech/tags/self-hosted.md>)

### AI overview

This tutorial outlines how to migrate a self-hosted Temporal Service to Temporal Cloud. It explains that migration occurs at the application level, typically requires minimal code changes rather than a database migration, and involves routing new and existing Workflow Executions to the cloud namespace.

### Source excerpt

Learn how migrating to Temporal Cloud enhances scalability, availability, and reduces latency, offering a more efficient, consumption-based solution.

## Astro 4.6

DevFeed: [Astro 4.6](<https://devfeed.tech/articles/astro-4-6-3209.md>)

Original publisher: [Read original article](<https://astro.build/blog/astro-460/>)

Author: Erika; Emanuele Stoppa; Matthew Phillips; Nate Moore; Bjorn Lu

Published: 2024-04-11T00:00:00Z

Content type: release

Language: en

Sources: [The Astro Blog](<https://devfeed.tech/sources/the-astro-blog.md>)

Topics: [Astro](<https://devfeed.tech/topics/astro.md>), [releases](<https://devfeed.tech/topics/releases.md>), [Routing (disambiguation)](<https://devfeed.tech/topics/routing.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>), [Node.js](<https://devfeed.tech/topics/node-js.md>)

Tags: [astro](<https://devfeed.tech/tags/astro.md>), [cli](<https://devfeed.tech/tags/cli.md>), [experimental](<https://devfeed.tech/tags/experimental.md>), [middleware](<https://devfeed.tech/tags/middleware.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [release](<https://devfeed.tech/tags/release.md>), [routing](<https://devfeed.tech/tags/routing.md>), [server-side-rendering](<https://devfeed.tech/tags/server-side-rendering.md>)

### AI overview

Astro 4.6 introduces manual routing for internationalized websites, movable dev toolbar positions, experimental CSRF protection for on-demand pages, expanded cookie attribute support, and deprecated support for older Node.js versions. The release can be installed through an automated CLI tool or manually with a package manager.

### Source excerpt

Astro 4.6 is here! This release includes a new manual routing strategy for internationalization, the ability to move the dev toolbar, experimental support for CSRF protection, and more.

## Interfaces 101 : Extensible API Handlers Ep. 10

DevFeed: [Interfaces 101 : Extensible API Handlers Ep. 10](<https://devfeed.tech/articles/interfaces-101-extensible-api-handlers-ep-10-22222.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2023/04/interfaces-101-extensible-api-handlers-ep-10.html>)

Published: 2023-04-03T00:00:00Z

Content type: tutorial

Language: en

Sources: [William Kennedy](<https://devfeed.tech/sources/william-kennedy.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [HTTP](<https://devfeed.tech/topics/http.md>), [Server](<https://devfeed.tech/topics/server.md>), [Logging](<https://devfeed.tech/topics/logging.md>), [interfaces](<https://devfeed.tech/topics/interfaces.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [go](<https://devfeed.tech/tags/go.md>), [golang](<https://devfeed.tech/tags/golang.md>), [handler](<https://devfeed.tech/tags/handler.md>), [http](<https://devfeed.tech/tags/http.md>), [http-server](<https://devfeed.tech/tags/http-server.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [logging](<https://devfeed.tech/tags/logging.md>), [middleware](<https://devfeed.tech/tags/middleware.md>), [request](<https://devfeed.tech/tags/request.md>), [web](<https://devfeed.tech/tags/web.md>)

### AI overview

A video tutorial demonstrates how to build an extensible HTTP API handler in Go. It covers defining a route and handler, designing composable middleware, and implementing logging middleware that measures request time.

### Source excerpt

Introduction In episode 9, Miki discussed how a command flag can be decoded into a user defined type with the Value interface. As a recap, the Value interface consists of two methods: one for serializing the underlying concrete type and one for deserializing a string into an object. To put this interface to the test, Miki wrote a command that had a flag to specify a network address. While implementing the Set method of the Value interface, Miki demonstrated how to add validation for your program's flags.

## Next.js 12.2

DevFeed: [Next.js 12.2](<https://devfeed.tech/articles/next-js-12-2-3172.md>)

Original publisher: [Read original article](<https://nextjs.org/blog/next-12-2>)

Author: Tobias Koppers

Published: 2022-06-28T16:00:00Z

Content type: release

Language: en

Sources: [Next.js Blog](<https://devfeed.tech/sources/next-js-blog.md>)

Topics: [Next.js](<https://devfeed.tech/topics/next-js.md>), [Server-side rendering](<https://devfeed.tech/topics/server-side-rendering.md>), [API](<https://devfeed.tech/topics/api.md>), [Edge](<https://devfeed.tech/topics/edge.md>), [Streaming](<https://devfeed.tech/topics/streaming.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [edge](<https://devfeed.tech/tags/edge.md>), [middleware](<https://devfeed.tech/tags/middleware.md>), [next-js](<https://devfeed.tech/tags/next-js.md>), [react](<https://devfeed.tech/tags/react.md>), [ssr](<https://devfeed.tech/tags/ssr.md>), [streaming](<https://devfeed.tech/tags/streaming.md>)

### AI overview

Next.js 12.2 introduces stable Middleware and On-Demand Incremental Static Regeneration, along with experimental Edge API Routes, Edge server rendering, and SWC Plugins. The release also includes improvements to Next.js and supports updating content without redeploying.

### Source excerpt

Next.js 12.2 introduces stable Middleware and On-Demand ISR, experimental Edge SSR and API Routes, and more!

## Using Express with GraphQL - How to create a GraphQL server with Node.js/Express

DevFeed: [Using Express with GraphQL - How to create a GraphQL server with Node.js/Express](<https://devfeed.tech/articles/using-express-with-graphql-how-to-create-a-graphql-server-with-node-js-express-23560.md>)

Original publisher: [Read original article](<https://www.apollographql.com/blog/using-express-with-graphql-server-node-js>)

Author: Khalil Stemmler

Published: 2021-03-02T11:39:13Z

Content type: tutorial

Language: en

Sources: [Apollo Blog](<https://devfeed.tech/sources/apollo-blog.md>)

Topics: [Express](<https://devfeed.tech/topics/express.md>), [GraphQL](<https://devfeed.tech/topics/graphql.md>), [apollo-server](<https://devfeed.tech/topics/apollo-server.md>), [Node.js](<https://devfeed.tech/topics/node-js.md>), [HTTP](<https://devfeed.tech/topics/http.md>), [API](<https://devfeed.tech/topics/api.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [apollo](<https://devfeed.tech/tags/apollo.md>), [authentication](<https://devfeed.tech/tags/authentication.md>), [backend](<https://devfeed.tech/tags/backend.md>), [express](<https://devfeed.tech/tags/express.md>), [graphql](<https://devfeed.tech/tags/graphql.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [http](<https://devfeed.tech/tags/http.md>), [js](<https://devfeed.tech/tags/js.md>), [middleware](<https://devfeed.tech/tags/middleware.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [rate-limiting](<https://devfeed.tech/tags/rate-limiting.md>), [rest](<https://devfeed.tech/tags/rest.md>), [security](<https://devfeed.tech/tags/security.md>)

### AI overview

A tutorial showing how to create a GraphQL server with Apollo Server and Express.js using the apollo-server-express package. It also explains the tradeoffs, including serving REST and GraphQL together, reusing Node.js middleware, and the additional boilerplate.

### Source excerpt

One of the fastest ways to get up and running with GraphQL is to install Apollo Server as middleware on your new or existing HTTP server. In this short post, we demonstrate how to use Apollo Server to create a GraphQL server with Express.js using the apollo-server-express package. At the end, we'll discuss the tradeoffs of this approach. Using Apollo Server with Express Let's start with the dependencies. Install dependencies You'll need the and packages.

## Setting Up Authentication and Authorization with Apollo Federation

DevFeed: [Setting Up Authentication and Authorization with Apollo Federation](<https://devfeed.tech/articles/setting-up-authentication-and-authorization-with-apollo-federation-23517.md>)

Original publisher: [Read original article](<https://www.apollographql.com/blog/setting-up-authentication-and-authorization-apollo-federation>)

Author: Mandi Wise

Published: 2020-05-15T12:17:09Z

Content type: tutorial

Language: en

Sources: [Apollo Blog](<https://devfeed.tech/sources/apollo-blog.md>)

Topics: [GraphQL](<https://devfeed.tech/topics/graphql.md>), [apollo-server](<https://devfeed.tech/topics/apollo-server.md>), [Authentication](<https://devfeed.tech/topics/authentication.md>), [Authorization](<https://devfeed.tech/topics/authorization.md>), [Express](<https://devfeed.tech/topics/express.md>), [JSON Web Tokens](<https://devfeed.tech/topics/jwt.md>), [API](<https://devfeed.tech/topics/api.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [apollo](<https://devfeed.tech/tags/apollo.md>), [apollo-federation](<https://devfeed.tech/tags/apollo-federation.md>), [authentication](<https://devfeed.tech/tags/authentication.md>), [authorization](<https://devfeed.tech/tags/authorization.md>), [backend](<https://devfeed.tech/tags/backend.md>), [graphql](<https://devfeed.tech/tags/graphql.md>), [jwt](<https://devfeed.tech/tags/jwt.md>), [middleware](<https://devfeed.tech/tags/middleware.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

### AI overview

This tutorial explains how to add authentication and authorization to a distributed GraphQL architecture using Apollo Federation. It covers signing and verifying JWTs at the gateway, forwarding tokens to an implementing service, and checking user permissions before resolver functions run.

### Source excerpt

Update: Auth now available in Apollo Router Apollo has shipped our new authentication and authorization features as built-in Router features. Checkout the launch post: When building out a distributed GraphQL architecture with Apollo Federation, we will often need to limit query access based on who requested the data (authentication) and whether they're allowed to see or change the data they requested (authorization).

## Lemon : Koa 风格的 Python 异步 Web 框架

DevFeed: [Lemon : Koa 风格的 Python 异步 Web 框架](<https://devfeed.tech/articles/lemon-koa-python-web-40998.md>)

Original publisher: [Read original article](<https://blog.joway.io/posts/lemon-overview/>)

Author: Joway

Published: 2018-01-08T00:00:00Z

Content type: tutorial

Language: zh

Sources: [Random Thoughts](<https://devfeed.tech/sources/random-thoughts.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [Koa](<https://devfeed.tech/topics/koa.md>), [middleware](<https://devfeed.tech/topics/middleware.md>), [ASGI](<https://devfeed.tech/topics/asgi.md>)

Tags: [async](<https://devfeed.tech/tags/async.md>), [middleware](<https://devfeed.tech/tags/middleware.md>), [python](<https://devfeed.tech/tags/python.md>), [tech](<https://devfeed.tech/tags/tech.md>), [web](<https://devfeed.tech/tags/web.md>)

### AI overview

The article introduces Lemon, a Python asynchronous web framework designed with a Koa-style middleware model. It explains the distinction between server and application responsibilities, discusses ASGI-compatible servers such as uvicorn, and describes Lemon's routing and context design.

### Source excerpt

前段时间想要写一些简短高效的 API ，背后的工作无非就是一些计算和数据处理，但是可能并发量会比较高。当我在 Python 的生态里去搜寻一些靠谱的 Web 框架时，很难找到一个设计优秀且运行效率高的框架。尤其是当我已经习惯了 NodeJS 的 Koa 那种简洁明了的设计时，很难再喜欢上像 Flask 那种装饰器的写法和各种概念拢杂在一起的设计。最后实在没有办法，就自己写了个符合我个人审美的框架 Lemon 。

## REST API with KoaJS and MongoDB (Part - 3)

DevFeed: [REST API with KoaJS and MongoDB (Part - 3)](<https://devfeed.tech/articles/rest-api-with-koajs-and-mongodb-part-3-26290.md>)

Original publisher: [Read original article](<https://masnun.com/rest-api-koajs-mongodb-part-3/>)

Author: masnun

Published: 2017-08-09T09:47:16Z

Content type: tutorial

Language: en

Sources: [Abu Ashraf Masnun](<https://devfeed.tech/sources/abu-ashraf-masnun.md>)

Topics: [JSON Web Tokens](<https://devfeed.tech/topics/jwt.md>), [Authentication](<https://devfeed.tech/topics/authentication.md>), [REST API](<https://devfeed.tech/topics/rest-api.md>), [MongoDB](<https://devfeed.tech/topics/mongodb.md>), [JSON](<https://devfeed.tech/topics/json.md>), [CRUD](<https://devfeed.tech/topics/crud.md>)

Tags: [authentication](<https://devfeed.tech/tags/authentication.md>), [crud](<https://devfeed.tech/tags/crud.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [jwt](<https://devfeed.tech/tags/jwt.md>), [koajs](<https://devfeed.tech/tags/koajs.md>), [middleware](<https://devfeed.tech/tags/middleware.md>), [mongodb](<https://devfeed.tech/tags/mongodb.md>), [nodejs](<https://devfeed.tech/tags/nodejs.md>), [rest](<https://devfeed.tech/tags/rest.md>)

### AI overview

Part 3 of a KoaJS and MongoDB REST API series explains how to add authentication with JSON Web Tokens, install JWT-related packages, secure routes with middleware, and return JSON authentication errors.

### Source excerpt

In Part -1 of this series, we saw how we can get started with KoaJS and in Part - 2 we built CRUD endpoints with MongoDB. In this part, we're going to work with authentication. We will be using JSON Web Tokens aka JWT for the auth part. We have written detailed pieces on JWT before. You [...] The post REST API with KoaJS and MongoDB (Part - 3) appeared first on Abu Ashraf Masnun.

## JWT Authentication

DevFeed: [JWT Authentication](<https://devfeed.tech/articles/jwt-authentication-35618.md>)

Original publisher: [Read original article](<https://zolmeister.com/2016/09/jwt-auth.html>)

Author: Zoli Kahan

Published: 2016-09-26T05:00:00Z

Content type: tutorial

Language: en

Sources: [Zolmeister](<https://devfeed.tech/sources/zolmeister.md>)

Topics: [JSON Web Tokens](<https://devfeed.tech/topics/jwt.md>), [Authentication](<https://devfeed.tech/topics/authentication.md>), [API](<https://devfeed.tech/topics/api.md>), [middleware](<https://devfeed.tech/topics/middleware.md>), [private key](<https://devfeed.tech/topics/private-key.md>), [public key](<https://devfeed.tech/topics/public-key.md>), [Security](<https://devfeed.tech/topics/security.md>), [Express](<https://devfeed.tech/topics/express.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [authentication](<https://devfeed.tech/tags/authentication.md>), [hosting](<https://devfeed.tech/tags/hosting.md>), [jwt](<https://devfeed.tech/tags/jwt.md>), [middleware](<https://devfeed.tech/tags/middleware.md>), [oauth](<https://devfeed.tech/tags/oauth.md>), [private-key](<https://devfeed.tech/tags/private-key.md>), [public-key](<https://devfeed.tech/tags/public-key.md>), [security](<https://devfeed.tech/tags/security.md>)

### AI overview

The article explains an authentication approach for hosting platforms that need to support third-party application access and verify local native API calls. It uses JSON Web Tokens with ES256 and a public/private key pair, followed by a sample authentication strategy and Express middleware implementation.

### Source excerpt

JWT Authentication Authentication models for hosting platforms require more considerations due to 3rd party api access. We wanted to be able to issue user auth tokens for 3rd party apps (think OAuth), as well as be able to verify authentication of local native api calls (through our iframe native app hooks).

## Building Redux Middleware

DevFeed: [Building Redux Middleware](<https://devfeed.tech/articles/building-redux-middleware-21867.md>)

Original publisher: [Read original article](<https://reactjsnews.com/redux-middleware>)

Author: Zach Silveira

Published: 2016-03-13T23:00:09Z

Content type: tutorial

Language: en

Sources: [ReactJS News](<https://devfeed.tech/sources/reactjs-news.md>)

Topics: [Redux](<https://devfeed.tech/topics/redux.md>), [API](<https://devfeed.tech/topics/api.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [building](<https://devfeed.tech/tags/building.md>), [callback](<https://devfeed.tech/tags/callback.md>), [function](<https://devfeed.tech/tags/function.md>), [guide](<https://devfeed.tech/tags/guide.md>), [middleware](<https://devfeed.tech/tags/middleware.md>), [react](<https://devfeed.tech/tags/react.md>), [redux](<https://devfeed.tech/tags/redux.md>), [request](<https://devfeed.tech/tags/request.md>), [state](<https://devfeed.tech/tags/state.md>), [webpack](<https://devfeed.tech/tags/webpack.md>)

### AI overview

A tutorial on building Redux middleware. It explains middleware as a chain of functions, shows how to apply custom middleware, filters actions by type, and demonstrates handling a POST request before invoking a callback.

### Source excerpt

After writing my post a few months ago on building your own redux app, I have been asked a couple times to write a guide on creating redux middleware and how it works. This will be a quick post on how you can acheive anything with your own middleware! ##Basic middleware const customMiddleware = store => next => action => { if(action.type !== 'custom') return next(action) //do stuff! } Applying it: import { createStore, applyMiddleware, } from 'redux' import reducer from './reducer' import customMiddleware from './customMiddleware' const store = createStore( reducer, applyMiddleware(customMiddleware) ) Whaaa? store => next => action => I know that looks confusing. Essentially you are building a chain of functions, it will look like this when it gets called: //next looks something like this: let dispatched = null let next = actionAttempt => dispatched = actionAttempt const dispatch = customMiddleware(store)(next) dispatch({ type: 'custom', value: 'test' }) All you are doing is chaining function calls and passing in the neccesary data. When I first saw this I was confused a little due to the long chain, but it made perfect sense after reading the article on writing redux tests. So now that we understand how those chained functions work, let's explain the first line of our middleware. if(action.type !== 'custom') return next(action) There should be some way to tell what actions should go through your middleware. In this example, we are saying if the action's type is not custom call next, which will pass it to any other middleware and then to the reducer. ##Doing Cool stuff The official guide on redux middleware covers a few examples on this, I'm going to try to explain it in a more simple way. Say we want an action like this: dispatch({ type: 'ajax', url: 'http://api.com', method: 'POST', body: state => ({ title: state.title description: state.description }), cb: response => console.log('finished!', response) }) We want this to do a post request, and then call the cb fu

## WebSockets, caution required!

DevFeed: [WebSockets, caution required!](<https://devfeed.tech/articles/websockets-caution-required-41340.md>)

Original publisher: [Read original article](<https://samsaffron.com/archive/2015/12/29/websockets-caution-required>)

Author: Sam Saffron

Published: 2015-12-29T23:25:05Z

Content type: opinion

Language: en

Sources: [Sam Saffron](<https://devfeed.tech/sources/sam-saffron.md>)

Topics: [WebSocket](<https://devfeed.tech/topics/websocket.md>), [realtime](<https://devfeed.tech/topics/realtime.md>), [Rails](<https://devfeed.tech/topics/rails.md>), [web applications](<https://devfeed.tech/topics/web-applications.md>), [HTTP](<https://devfeed.tech/topics/http.md>), [middleware](<https://devfeed.tech/topics/middleware.md>)

Tags: [http](<https://devfeed.tech/tags/http.md>), [middleware](<https://devfeed.tech/tags/middleware.md>), [rails](<https://devfeed.tech/tags/rails.md>), [realtime](<https://devfeed.tech/tags/realtime.md>), [rest](<https://devfeed.tech/tags/rest.md>), [web-applications](<https://devfeed.tech/tags/web-applications.md>), [websockets](<https://devfeed.tech/tags/websockets.md>)

### AI overview

The article cautions that WebSockets are not automatically a clear win for most realtime web applications. It highlights operational and development concerns, including debugging, logging, profiling, rate limiting, database connection exhaustion, and the choice between WebSockets and REST for client-to-server communication. It suggests WebSockets are more appropriate for specialized high-concurrency cases such as managing 10k interactive console sessions.

### Source excerpt

When developers hear that WebSockets are going to land in the near future in Rails they get all giddy with excitement. minions.jpg492x219 23.2 KB But your users don't care if you use WebSockets: Users want "delightful realtime web apps". Developers want "delightfully easy to build realtime web apps". Operations want "delightfully easy to deploy, scale and manage realtime web apps". If WebSockets get us there, great, but it is an implementation detail that comes at high cost. Do we really need ultra high performance, full duplex Client-Server communication? WebSockets provides simple APIs to broadcast information to clients and simple APIs to ship information from the clients to the web server. A realtime channel to send information from the server to the client is very welcome. In fact it is a part of HTTP 1.1. However, a brand new API for shipping information to the server from web browsers introduces a new decision point for developers: When a user posts a message on chat, do I make a RESTful call and POST a message or do I bypass REST and use WebSockets? If I use the new backchannel, how do I debug it? How do I log what is going on? How do I profile it? How do I ensure it does not slow down other traffic to my site? Do I also expose this endpoint in a controller action? How do I rate limit this? How do I ensure my background WebSocket thread does not exhaust my db connection limit? If an API allows hundreds of different connections concurrent access to the database, bad stuff will happen. Introducing this backchannel is not a clear win and comes with many caveats. I do not think the majority of web applications need a new backchannel into the web server. On a technical level you would opt for such a construct if you were managing 10k interactive console sessions on the web. You can transport data more efficiently to the server, in that the web server no longer needs to parse HTTP headers, Rails does not need to do a middleware crawl and so on. But the majority of

## Easy custom auth in Clojure with Friend

DevFeed: [Easy custom auth in Clojure with Friend](<https://devfeed.tech/articles/easy-custom-auth-in-clojure-with-friend-32119.md>)

Original publisher: [Read original article](<https://adambard.com/blog/easy-auth-with-friend/>)

Published: 2015-06-10T00:00:00Z

Content type: tutorial

Language: en

Sources: [Adam Bard](<https://devfeed.tech/sources/adam-bard.md>)

Topics: [Clojure](<https://devfeed.tech/topics/clojure.md>), [Authentication](<https://devfeed.tech/topics/authentication.md>), [Code](<https://devfeed.tech/topics/code.md>), [function](<https://devfeed.tech/topics/function.md>), [middleware](<https://devfeed.tech/topics/middleware.md>)

Tags: [auth](<https://devfeed.tech/tags/auth.md>), [authentication](<https://devfeed.tech/tags/authentication.md>), [clojure](<https://devfeed.tech/tags/clojure.md>), [code](<https://devfeed.tech/tags/code.md>), [function](<https://devfeed.tech/tags/function.md>), [middleware](<https://devfeed.tech/tags/middleware.md>), [password](<https://devfeed.tech/tags/password.md>)

### AI overview

This tutorial explains how to use Friend for simple custom authentication workflows in Clojure. It introduces Friend's middleware and workflow concepts, then uses a toy authentication system to illustrate how requests can produce a response, continue to another workflow, or authenticate a user.

### Source excerpt

I've used friend to provide auth in my projects a few times, and considered it many more before resorting to my own hand-rolled business. Most of the reason for this is that is just seems so complicated. Workflows? Credentials? I just want to check a password and stash a user object in the session, end of story. After I did some investigating, though, it turns out that you can usefully deploy friend for even very simple workflows, if you understand how it works.

[Next page](<https://devfeed.tech/tags/middleware.md?cursor=WyIyMDE1LTA2LTEwVDAwOjAwOjAwKzAwOjAwIiwgIjZmZWE5NGMzLTVjNGItNGNkMy04ZjE3LTllYjUxY2RlZDQ5NSJd>)