Class CloudPakForDataServiceAuthenticator

  • All Implemented Interfaces:
    Authenticator

    public class CloudPakForDataServiceAuthenticator
    extends TokenRequestBasedAuthenticator<Cp4dToken,​Cp4dTokenResponse>
    implements Authenticator
    This class provides an Authenticator implementation for the "CloudPakForData" environment. This authenticator will use the configured url and other properties to automatically fetch an access token for service to service authentication from the CloudPakForData service token service. When the access token expires, a new access token will be fetched. This authenticator uses the "GET /v1/service_token" operation supported by the CloudPakForData service token service. As such, you can configure the username, displayName, uid, permissions and expirationTime properties. The url and serviceBrokerSecret properties are required, the rest are optional.
    • Method Detail

      • fromConfiguration

        public static CloudPakForDataServiceAuthenticator fromConfiguration​(java.util.Map<java.lang.String,​java.lang.String> config)
        Construct a CloudPakForDataServiceAuthenticator instance using properties retrieved from the specified Map.
        Parameters:
        config - a map containing the configuration properties
        Returns:
        the CloudPakForDataServiceAuthenticator instance
      • getURL

        public java.lang.String getURL()
        Returns:
        the URL configured for this authenticator
      • getUsername

        public java.lang.String getUsername()
        Returns:
        the username configured for this authenticator
      • getDisplayName

        public java.lang.String getDisplayName()
        Returns:
        the displayName configured for this authenticator
      • getUid

        public java.lang.String getUid()
        Returns:
        the uid configured for this authenticator
      • getPermissions

        public java.lang.String getPermissions()
        Returns:
        the permissions configured for this authenticator
      • getExpirationTime

        public java.lang.String getExpirationTime()
        Returns:
        the expirationTime configured for this authenticator
      • getServiceBrokerSecret

        public java.lang.String getServiceBrokerSecret()
        Returns:
        the serviceBrokerSecret configured for this authenticator