ConfigHelper overview
Configuration helper functions for PingOne CLI commands.
Added in v0.0.1
Table of contents
utils
DEFAULT_PINGONE_API_URL
Default PingOne API base URL.
Signature
export declare const DEFAULT_PINGONE_API_URL: "https://api.pingone.com/v1"
Added in v0.0.1
getApiBaseUrl
Gets PingOne API base URL from environment variable, stored credentials, or default. Priority: PINGONE_API_URL env var > stored credentials region > default (https://api.pingone.com/v1)
This allows using different PingOne regions or environments:
- North America: https://api.pingone.com/v1 (default)
- Europe: https://api.pingone.eu/v1
- Asia Pacific: https://api.pingone.asia/v1
- Canada: https://api.pingone.ca/v1
Signature
export declare const getApiBaseUrl: () => Effect.Effect<any, never, CredentialService>
Added in v0.0.1
getEnvironmentId
Gets PingOne environment ID from CLI option, environment variable, or OAuth service. Priority: CLI option > PINGONE_ENV_ID env var > OAuth service (stored credentials)
The environment ID can be:
- Provided directly via –environment-id flag
- Set via PINGONE_ENV_ID environment variable
- Automatically obtained from stored credentials (after running ‘p1-cli auth login’)
Signature
export declare const getEnvironmentId: (
cliOption: Option.Option<string>
) => Effect.Effect<any, PingOneAuthError, OAuthService>
Added in v0.0.1
getToken
Gets PingOne OAuth 2.0 access token from CLI option, environment variable, or OAuth service. Priority: CLI option > PINGONE_TOKEN env var > OAuth service (stored credentials)
The access token can be:
- Provided directly via –pingone-token flag (for backward compatibility)
- Set via PINGONE_TOKEN environment variable (for CI/CD pipelines)
- Automatically obtained via OAuth client credentials flow using stored credentials
For the OAuth flow, use p1-cli auth login to store your client credentials first.
Signature
export declare const getToken: (
cliOption: Option.Option<Redacted.Redacted<string>>
) => Effect.Effect<any, PingOneAuthError, OAuthService>
Added in v0.0.1