Skip to main content

ProfileResolver

  • Namespace: PPDS.Auth.Profiles
  • Assembly: PPDS.Auth
  • Kind: Class

Summary

Resolves which profile to use based on the priority order:

  1. Explicit profile name (CLI flag or API parameter)
  2. PPDS_PROFILE environment variable
  3. Global active profile from profiles.json

Members

Methods

GetEffectiveProfileName

string GetEffectiveProfileName(string explicitProfile)

Gets the effective profile name to use, following the priority order:

  1. Explicit profile (from CLI flag or API parameter)
  2. PPDS_PROFILE environment variable
  3. 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.