Skip to content

[adt-auth] Implement BTP Service Key auth plugin in @abapify/adt-auth #71

@ThePlenkov

Description

@ThePlenkov

Implement a new authentication plugin for BTP Service Key inside the @abapify/adt-auth package by migrating the legacy ServiceKeyParser, BTPServiceKey, and UAACredentials types from packages/adt-cli/src/lib/auth-utils.ts.

  • Create new plugin in src/plugins/service-key.ts
  • Must implement AuthPlugin interface (authenticate(options)):
    • Accept serviceKeyJson: string | object
    • Use ServiceKeyParser to validate and extract credentials
    • Fetch OAuth2 client_credentials token if required (serviceKey.uaa.url/oauth/token)
    • Return either CookieAuthResult or BasicAuthResult depending on extracted credential type
  • Ensure plugin is exported in tsdown.config.ts and src/index.ts
  • Migrate PKCE/OAuth helpers from oauth-utils.ts to src/utils/pkce.ts
  • Remove old files from adt-cli (auth-utils.ts, oauth-utils.ts) once migration complete

Parent Epic: #70

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions