Package com.pingidentity.access
Class PingOneEnvironmentAccessor
java.lang.Object
com.pingidentity.access.PingOneEnvironmentAccessor
Allows access to a PingOne connection and environment, given the value of a plugin
configuration field based on
PingOneEnvironmentFieldDescriptor.- Since:
- 10.2
-
Constructor Summary
ConstructorsConstructorDescriptionPingOneEnvironmentAccessor(String connEnvFieldValue) Create an accessor given the value of a plugin configuration field based onPingOneEnvironmentFieldDescriptor. -
Method Summary
Modifier and TypeMethodDescriptionExchange the connection credential for an access token.getAuthenticationEndpoint(boolean withEnvironment) Get the authentication endpoint for this connection.Return the PingOne environment ID parsed from the config field value.Get the management API endpoint for this connection.
-
Constructor Details
-
PingOneEnvironmentAccessor
Create an accessor given the value of a plugin configuration field based onPingOneEnvironmentFieldDescriptor.- Parameters:
connEnvFieldValue- Configuration field value containing the connection and environment reference.
-
-
Method Details
-
getEnvironmentId
Return the PingOne environment ID parsed from the config field value.- Returns:
- The PingOne environment ID.
-
getAuthenticationEndpoint
Get the authentication endpoint for this connection.- Parameters:
withEnvironment- Determines whether the environment ID is included in the returned URL.- Returns:
- The authentication endpoint.
-
getManagementEndpoint
Get the management API endpoint for this connection.- Returns:
- The management API endpoint.
-
getAccessToken
Exchange the connection credential for an access token. The token should be cached and reused until it becomes invalid.- Returns:
- An access token that can be used to call PingOne APIs.
- Throws:
InvalidConnectionCredentialException- If the connection credential is invalid.PingOneConnectionDisabledException- If the connection is disabled.IOException- If another error occurred.
-