Package com.microstrategy.webapi.acm
Class ACMJwt
- java.lang.Object
-
- com.microstrategy.webapi.acm.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
-
Field Summary
Fields Modifier and Type Field Description EncryptedObject<ACMJwt.Header>
mHeader
-
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 HashMapjava.lang.String
getJWT()
getJWT
returns a JWT that can be used directly to send to IServerint
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 HashMapboolean
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
-
-
-
Field Detail
-
mHeader
public final EncryptedObject<ACMJwt.Header> mHeader
-
-
Constructor Detail
-
ACMJwt
public ACMJwt(java.lang.String iContents) throws MSTRWebAPIException
- Throws:
MSTRWebAPIException
-
ACMJwt
public ACMJwt(java.lang.String iContents, int iTokenLifetimeMinutes) throws MSTRWebAPIException
- Throws:
MSTRWebAPIException
-
-
Method Detail
-
deepClone
public ACMJwt deepClone() throws MSTRWebAPIException
- Throws:
MSTRWebAPIException
-
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 classjava.lang.Object
-
hashCode
public int hashCode()
hashCode is implemented so this can be used as a key in a HashMap- Overrides:
hashCode
in classjava.lang.Object
-
isNotEmpty
public boolean isNotEmpty()
-
toString
public java.lang.String toString()
To get the JWT value use
- Overrides:
toString
in classjava.lang.Object
-
getJWT
public java.lang.String getJWT() throws MSTRWebAPIException
getJWT
returns a JWT that can be used directly to send to IServer- Returns:
- Throws:
MSTRWebAPIException
-
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
-
-
-