Skip to content

Refactor cuiman authentication configuration - #192

Draft
forman wants to merge 1 commit into
mainfrom
forman/176-auth_renaming_for_oauth2
Draft

Refactor cuiman authentication configuration#192
forman wants to merge 1 commit into
mainfrom
forman/176-auth_renaming_for_oauth2

Conversation

@forman

@forman forman commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Closes #176.

This PR separates proprietary login from standards-based OAuth2 authentication and makes the configuration shape explicit per authentication mechanism.

See also required eo-tools/eozilla-app#76

Changes

  • Replaced the flat authentication configuration with nested, discriminated auth models:
    • none
    • basic
    • token
    • login
    • oauth2
    • api-key
  • Added typed OAuth2GrantType support for password and client_credentials.
  • Renamed ambiguous fields:
    • auth_urllogin_url or token_url
    • tokenaccess_token
    • token_headeraccess_token_header
  • Updated cuiman configure, CLI options, environment-variable handling, token refresh, and client integration.
  • Updated the Eozilla App service payload contract to recognize the renamed camel-case fields and apply Basic, token, and API-key request headers.

Configuration migration

Compatibility is intentionally limited:

  • Legacy flat none, basic, token, and api-key file configurations are converted when read.

  • A legacy flat login configuration containing auth_url fails with:

    Legacy configuration format detected, please run 'cuiman configure'

This avoids incorrectly treating a proprietary login flow as OAuth2.

Validation

  • cuiman: 303 tests passed; Ruff and Mypy passed.
  • eozilla-app: 164 tests passed; TypeScript typecheck and ESLint passed.

Checklist (strike out non-applicable):

  • Changes documented in CHANGES.md
  • Related issue exists and is referred to in the PR description and CHANGES.md
  • Added docstrings and API docs for any new/modified user-facing classes and functions
  • Changes/features documented in docs/*
  • Unit-tests adapted/added for changes/features
  • Test coverage remains or increases (target 100%)

@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@forman forman changed the title Implemented oauth2-related authentication redesign Refactor cuiman authentication configuration Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename authentication configuration to OAuth2 terminology and introduce typed grant enum

1 participant