dify/api/tests/unit_tests
GareArc 71e9e8dda6
feat(api): lift SSO branch device-flow handlers to /openapi/v1 (Phase D.15-16)
The four EE-only SSO handlers (sso_initiate, sso_complete,
approval_context, approve_external) move from controllers/oauth_device_sso.py
to controllers/openapi/oauth_device/. Each is registered on openapi_bp
via @bp.route at the canonical path:

  /openapi/v1/oauth/device/sso-initiate
  /openapi/v1/oauth/device/sso-complete
  /openapi/v1/oauth/device/approval-context
  /openapi/v1/oauth/device/approve-external

sso-complete moves under /oauth/device/ from its previous orphan path
/v1/device/sso-complete; the IdP-side ACS callback URL hardcoded in
sso_initiate now points to the canonical path. Operators must
re-register the ACS callback with each IdP before Phase F deletes the
legacy alias.

oauth_device_sso.py shrinks to a thin re-mount file: same legacy bp
with attach_anti_framing applied, four bp.add_url_rule() calls binding
the legacy paths to the imported view functions. Same handler runs
for both mounts — no duplicated logic.

attach_anti_framing(openapi_bp) added in controllers/openapi/__init__.py
so X-Frame-Options + frame-ancestors CSP cover the canonical paths too.

Plan: docs/superpowers/plans/2026-04-26-openapi-migration.md (in difyctl repo).
2026-04-27 00:00:24 -07:00
..
commands feat: add metrics to clean message and workflow-run task (#33143) 2026-03-17 13:55:28 +08:00
configs feat: support configurable redis key prefix (#35139) 2026-04-14 09:31:41 +00:00
controllers feat(api): lift SSO branch device-flow handlers to /openapi/v1 (Phase D.15-16) 2026-04-27 00:00:24 -07:00
core fix: prevent double /v1 in MCP server URL causing 404 authorization failure (#34596) 2026-04-20 02:42:59 +00:00
enterprise/telemetry refactor: replace bare dict with dict[str, Any] in enterprise telemetry, external data tool, and moderation tests (#35185) 2026-04-14 17:51:02 +00:00
events feat: enterprise otel exporter (#33138) 2026-03-27 07:56:31 +00:00
extensions feat: support configurable redis key prefix (#35139) 2026-04-14 09:31:41 +00:00
factories chore(api): adapt Graphon 0.2.2 upgrade (#35377) 2026-04-18 11:16:24 +00:00
fields chore(api): adapt Graphon 0.2.2 upgrade (#35377) 2026-04-18 11:16:24 +00:00
libs feat(api): add require_scope decorator (Phase A.4) 2026-04-26 23:27:48 -07:00
models chore(api): adapt Graphon 0.2.2 upgrade (#35377) 2026-04-18 11:16:24 +00:00
oss refactor(api): replace test fixture side-effect imports (#34421) 2026-04-02 04:55:15 +00:00
repositories feat: collaboration (#30781) 2026-04-16 02:21:04 +00:00
services chore(api): adapt Graphon 0.2.2 upgrade (#35377) 2026-04-18 11:16:24 +00:00
tasks chore: reorg imports (#35308) 2026-04-16 08:50:02 +00:00
tools chore: reorg imports (#35308) 2026-04-16 08:50:02 +00:00
utils chore: reorg imports (#35308) 2026-04-16 08:50:02 +00:00
__init__.py FEAT: NEW WORKFLOW ENGINE (#3160) 2024-04-08 18:51:46 +08:00
.gitignore Enhance Code Consistency Across Repository with .editorconfig (#19023) 2025-04-29 18:04:33 +08:00
conftest.py refactor: select in service API wraps, file_preview, and site controllers (#34086) 2026-03-25 23:01:05 +09:00