|
17 | 17 |
|
18 | 18 | This package provides interfaces and utilities for higher-level applications
|
19 | 19 | to inject configuration into the Planet Authentication Library.
|
| 20 | +
|
| 21 | +The Planet Auth Library provides configuration injection to improve the |
| 22 | +end-user experience of tools built on top of the Planet Auth Library. |
| 23 | +This allows built-in default client configurations to be provided. |
| 24 | +Namespacing may also be configured to avoid collisions in the Auth Library's |
| 25 | +use of environment variables. Injected configration is primarily consumed |
| 26 | +by initialization functionality in planet_auth_utils.PlanetAuthFactory |
| 27 | +and the various planet_auth_utils provided `click` commands. |
| 28 | +
|
| 29 | +These concerns belong more to the final end-user application than to a |
| 30 | +library that sits between the Planet Auth library and the end-user |
| 31 | +application, that itself may be used by a variety of applications in |
| 32 | +a variety of deployment environments |
| 33 | +
|
| 34 | +Library writers may provide configuration injection to their developers, |
| 35 | +but should be conscious of the fact that multiple libraries within an |
| 36 | +application may depend on Planet Auth libraries. Library writers are |
| 37 | +advised to provide configuration injection as an option for their users, |
| 38 | +and not silently force it into the loaded. |
| 39 | +
|
| 40 | +In order to inject configuration, the application writer must do two things: |
| 41 | +
|
| 42 | +1. They must write a class that implements the |
| 43 | + [planet_auth_config_injection.BuiltinConfigurationProviderInterface][] |
| 44 | + interface. |
| 45 | +2. They must set the environment variable `PL_AUTH_BUILTIN_CONFIG_PROVIDER` to the |
| 46 | + fully qualified package, module, and class name of their implementation |
| 47 | + _before_ any import of the `planet_auth` or `planet_auth_utils` packages. |
20 | 48 | """
|
21 | 49 |
|
22 | 50 | from .builtins_provider import (
|
|
0 commit comments