ProfileResolver
- Namespace:
PPDS.Auth.Profiles - Assembly:
PPDS.Auth - Kind: Class
Summary
Resolves which profile to use based on the priority order:
- Explicit profile name (CLI flag or API parameter)
- PPDS_PROFILE environment variable
- Global active profile from profiles.json
Members
Methods
GetEffectiveProfileName
string GetEffectiveProfileName(string explicitProfile)
Gets the effective profile name to use, following the priority order:
- Explicit profile (from CLI flag or API parameter)
- PPDS_PROFILE environment variable
- Returns null (caller should use global active profile)
-
Param
explicitProfile: Profile explicitly specified by user (e.g., --profile flag). -
Returns: The profile name to use, or null if the global active profile should be used.
ResolveProfile
AuthProfile ResolveProfile(ProfileCollection collection, string explicitProfile)
Resolves the effective profile from a collection, following the priority order.
-
Param
collection: The profile collection to search. -
Param
explicitProfile: Profile explicitly specified by user (e.g., --profile flag). -
Returns: The resolved profile, or null if no matching profile found.
Fields
ProfileEnvironmentVariable
string ProfileEnvironmentVariable
Environment variable name for profile override.