com.ibm.streamsx.rest.internal.icp4d

Class ICP4DUserAuthenticator

  • java.lang.Object
    • com.ibm.streamsx.rest.internal.icp4d.ICP4DUserAuthenticator
  • All Implemented Interfaces:
    java.util.function.Function<org.apache.http.client.fluent.Executor,java.lang.String>


    public class ICP4DUserAuthenticator
    extends java.lang.Object
    implements java.util.function.Function<org.apache.http.client.fluent.Executor,java.lang.String>
    This class is an Authenticator that authenticates the user by using its user token. Use this interface only with CP4D >= 3.5 and Streams >= 5.5.
    Since:
    1.17
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String apply(org.apache.http.client.fluent.Executor t)
      Returns an encoded Bearer auth header.
      static ICP4DUserAuthenticator of(com.google.gson.JsonObject service, boolean verify)
      Creates a new ICP4DUserAuthenticator instance from the service definition JSON object 'topology.service.definition'.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.function.Function

        andThen, compose, identity
    • Method Detail

      • of

        public static ICP4DUserAuthenticator of(com.google.gson.JsonObject service,
                                                boolean verify)
        Creates a new ICP4DUserAuthenticator instance from the service definition JSON object 'topology.service.definition'. CP4D must be at least version 3.5. Requires that the 'topology.service.definition' contains the 'user_token'.
        Parameters:
        service - the service definition object 'topology.service.definition'
        Returns:
        a new Service instance
      • apply

        public java.lang.String apply(org.apache.http.client.fluent.Executor t)
        Returns an encoded Bearer auth header.
        Specified by:
        apply in interface java.util.function.Function<org.apache.http.client.fluent.Executor,java.lang.String>
streamsx.topology 1.18 @ IBMStreams GitHub