Class ACMJwt


  • public class ACMJwt
    extends java.lang.Object
    ACMJwt represents the JWT as given by the IServer. The object, once created is immutable, because only the IServer knows how to modify it The ACMJwt is used as a parameter when creating a new sessionID, so we need to know very little about its contents.

    It would be easy to just use the string version of the contents as the representation. But, by using a special object, the compiler can tell the difference between a JWT, a Project Id, and a Session Id (Master, Configuration, Project). This ensures the maps are type safe - in other words we never accidentally use a Project Session Id as a JWT!
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  ACMJwt.Header  
    • Constructor Summary

      Constructors 
      Constructor Description
      ACMJwt​(java.lang.String iContents)  
      ACMJwt​(java.lang.String iContents, int iTokenLifetimeMinutes)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ACMJwt deepClone()  
      boolean equals​(java.lang.Object iThat)
      equals is implemented so this can be used as a key in a HashMap
      java.lang.String getJWT()
      getJWT returns a JWT that can be used directly to send to IServer
      int getTokenLifetimeMinutes()
      getTokenLifetimeMinutes returns the Token Lifetime (Minutes) of the JWT configured in Intelligence Server return -1 when token lifetime is not returned from Intelligence Server e.g.
      int hashCode()
      hashCode is implemented so this can be used as a key in a HashMap
      boolean isNotEmpty()  
      void setTokenLifetimeMinutes​(int iTokenLifetimeMinutes)
      setTokenLifetimeMinutes sets the Token Lifetime (Minutes) The API is intended to update the Token Life time (minutes) based on the value read from Intelligence Server.
      java.lang.String toString()
      To get the JWT value use

      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object iThat)
        equals is implemented so this can be used as a key in a HashMap
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        hashCode is implemented so this can be used as a key in a HashMap
        Overrides:
        hashCode in class java.lang.Object
      • isNotEmpty

        public boolean isNotEmpty()
      • toString

        public java.lang.String toString()
        To get the JWT value use

        Overrides:
        toString in class java.lang.Object
      • getTokenLifetimeMinutes

        public int getTokenLifetimeMinutes()
        getTokenLifetimeMinutes returns the Token Lifetime (Minutes) of the JWT configured in Intelligence Server return -1 when token lifetime is not returned from Intelligence Server e.g. REST/Library server connecting to Intelligence Server prior to 11.2.2
        Returns:
      • setTokenLifetimeMinutes

        public void setTokenLifetimeMinutes​(int iTokenLifetimeMinutes)
        setTokenLifetimeMinutes sets the Token Lifetime (Minutes) The API is intended to update the Token Life time (minutes) based on the value read from Intelligence Server. The API should not be used for other intentions
        Parameters:
        iTokenLifetimeMinutes -