name: pwn-ai-providerauth description: Check whether a provider may request interactive consent. license: MIT metadata: bundled: true generated: false preserve: true module: PWN::AI::ProviderAuth source: pwn/ai/provider_auth.rb
PWN::AI::ProviderAuth
status describes a provider's settings without contacting it. For example,
in a PWN Ruby console with the configuration loaded:
PWN::AI::ProviderAuth.status(engine: :gemini, config: PWN::Config::Env.fetch(:ai).fetch(:gemini))
:enrollment means sign-in was requested, not that a grant exists.
:catalog_oauth labels a Gemini or Open WebUI credential for get_models and
get_model only. Ollama without a key is :local on a stock self-hosted server
but :missing for direct https://ollama.com access. None of these statuses
proves live access. interactive? checks for an operator terminal;
PWN_NONINTERACTIVE=1 suppresses new consent, not the use or refresh of an
existing grant. A blank key or client ID is not an opt-in.
To test access, run only the chosen adapter's get_models catalog check in
documentation/AI-Integration.md. Let the operator complete any consent in
their own terminal/browser. Do not request codes, tokens or raw configuration
in chat or logs.
