{"id":18887,"library":"ui5-middleware-proxy-basicauth","title":"ui5-middleware-proxy-basicauth","description":"UI5 middleware for adding basic authentication to proxy requests in UI5 tooling (v0.0.6). It extends the simple proxy from the ui5-ecosystem-showcase, allowing developers to proxy OData or other services behind Basic Auth. Key differentiator: integrates seamlessly with UI5's custom middleware configuration (ui5.yaml) and reads credentials from environment variables (.env). Release cadence: low; last update was 2021. Compared to alternatives like ui5-middleware-proxy, this adds built-in auth support without extra libraries.","status":"active","version":"0.0.6","language":"javascript","source_language":"en","source_url":"https://github.com/Schoutenk/ui5-middleware-proxy-basicauth","tags":["javascript"],"install":[{"cmd":"npm install ui5-middleware-proxy-basicauth","lang":"bash","label":"npm"},{"cmd":"yarn add ui5-middleware-proxy-basicauth","lang":"bash","label":"yarn"},{"cmd":"pnpm add ui5-middleware-proxy-basicauth","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required for custom middleware support in UI5 tooling","package":"@ui5/server","optional":false}],"imports":[],"quickstart":{"code":"// Not a library with JS imports; configured in ui5.yaml.\n// Example ui5.yaml:\nserver:\n  customMiddleware:\n  - name: ui5-middleware-proxy-basicauth\n    afterMiddleware: compression\n    mountPath: /odata\n    configuration:\n      baseUri: \"http://services.odata.org\"\n      client: \"110\"\n\n// Set credentials in .env:\nPROXY_USERNAME=yourusername\nPROXY_PASSWORD=yourpassword","lang":"yaml","description":"Configures the middleware in UI5's ui5.yaml and sets Basic Auth credentials via environment variables."},"warnings":[{"fix":"Set PROXY_USERNAME and PROXY_PASSWORD environment variables.","message":"Credentials must be defined in .env file; otherwise, proxy fails silently.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Add the package to both sections as shown in README.","message":"The middleware requires the UI5 tooling dependency to be declared in both devDependencies and ui5.dependencies in package.json.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Specify mountPath starting with /.","message":"mountPath must be a path prefix (e.g., /odata); otherwise, requests may not match.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Check compatibility or consider using a maintained alternative.","message":"This package has not been updated since 2021 and may not support newer UI5 versions.","severity":"deprecated","affected_versions":"=0.0.6"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install ui5-middleware-proxy-basicauth --save-dev' and add to ui5.dependencies in package.json.","cause":"Package not installed or not declared in ui5.dependencies.","error":"Error: Cannot find module 'ui5-middleware-proxy-basicauth'"},{"fix":"Ensure .env file exists with PROXY_USERNAME and PROXY_PASSWORD set correctly.","cause":"Missing or incorrect Basic Auth credentials in .env.","error":"Proxy returns 401 Unauthorized"},{"fix":"Verify the 'name' field matches exactly 'ui5-middleware-proxy-basicauth' and the package is installed.","cause":"Middleware name mismatch in ui5.yaml or missing dependency declaration.","error":"No middleware with name 'ui5-middleware-proxy-basicauth' found"},{"fix":"Add 'baseUri' under 'configuration' in ui5.yaml.","cause":"Configuration object missing 'baseUri' property.","error":"TypeError: Cannot read property 'proxy' of undefined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}