Class PingOneEnvironmentAccessor

java.lang.Object
com.pingidentity.access.PingOneEnvironmentAccessor

public class PingOneEnvironmentAccessor extends Object
Allows access to a PingOne connection and environment, given the value of a plugin configuration field based on PingOneEnvironmentFieldDescriptor.
Since:
10.2
  • Constructor Details

    • PingOneEnvironmentAccessor

      public PingOneEnvironmentAccessor(String connEnvFieldValue)
      Create an accessor given the value of a plugin configuration field based on PingOneEnvironmentFieldDescriptor.
      Parameters:
      connEnvFieldValue - Configuration field value containing the connection and environment reference.
  • Method Details

    • getEnvironmentId

      public String getEnvironmentId()
      Return the PingOne environment ID parsed from the config field value.
      Returns:
      The PingOne environment ID.
    • getAuthenticationEndpoint

      public String getAuthenticationEndpoint(boolean withEnvironment)
      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

      public String getManagementEndpoint()
      Get the management API endpoint for this connection.
      Returns:
      The management API endpoint.
    • getAccessToken

      public String getAccessToken() throws IOException
      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.