Skip to content

v1.2.0 — SupportsCredentialForm interface

Choose a tag to compare

@lopadova lopadova released this 19 Jun 12:15
· 5 commits to main since this release

Adds an optional capability interface so AskMyDocs (and any host) can render a native admin form for credential-based connectors (host/port/username/password — e.g. IMAP), instead of being limited to the OAuth-redirect flow.

  • Padosoft\AskMyDocsConnectorBase\Contracts\SupportsCredentialForm — credentialFormSchema(): array advertises the fields the host should render.
  • Padosoft\AskMyDocsConnectorBase\Support\CredentialField — readonly value object (name/label/type/target/required/secret/default/options/showIf/help/group) with toArray().

Field target tells the host where to store each value (connection/config → config_json, auth_mode/provider → installation, secret → routed through handleOAuthCallback to the encrypted vault).

Purely additive and backward compatible — OAuth-only connectors are unaffected and need no changes. 72 tests, PHPStan + Pint clean.