Shared functionality for Mix tasks related to provider management.
This module extracts common patterns from Mix tasks to reduce complexity and improve maintainability.
Summary
Functions
Creates API key provider from catalog configuration.
Creates OAuth2 provider from catalog configuration.
Creates a simple API key provider when not found in catalog.
Displays usage information for provider creation.
Displays provider creation error with formatted changeset errors.
Displays general usage information.
Displays successful provider creation message.
Ensures the repo is started for Mix tasks.
Fetches provider configuration from catalog with error handling.
Parses and combines OAuth2 scopes from command line options.
Prints changeset errors in a readable format.
Suggests similar provider names when provider not found.
Validates API key credentials are provided.
Validates OAuth2 credentials are provided.
Functions
Creates API key provider from catalog configuration.
Creates OAuth2 provider from catalog configuration.
Creates a simple API key provider when not found in catalog.
Displays usage information for provider creation.
Displays provider creation error with formatted changeset errors.
Displays general usage information.
Displays successful provider creation message.
Shows provider details including optional default scopes for OAuth2 providers.
Ensures the repo is started for Mix tasks.
Delegates to TaskHelper for consistent application startup.
Fetches provider configuration from catalog with error handling.
Parses and combines OAuth2 scopes from command line options.
Handles both --scope (individual, can be repeated) and --scopes (comma-separated) options, combining them with any default scopes from the catalog.
Prints changeset errors in a readable format.
Suggests similar provider names when provider not found.
Validates API key credentials are provided.
Validates OAuth2 credentials are provided.