Package com.microstrategy.webapi.acm
Class ACMJwt
- java.lang.Object
-
- com.microstrategy.webapi.acm.ACMJwt
-
public class ACMJwt extends java.lang.ObjectACMJwt 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 classACMJwt.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 booleanequals(java.lang.Object iThat)equals is implemented so this can be used as a key in a HashMapjava.lang.StringgetJWT()getJWTreturns a JWT that can be used directly to send to IServerintgetTokenLifetimeMinutes()getTokenLifetimeMinutesreturns the Token Lifetime (Minutes) of the JWT configured in Intelligence Server return -1 when token lifetime is not returned from Intelligence Server e.g.inthashCode()hashCode is implemented so this can be used as a key in a HashMapbooleanisNotEmpty()voidsetTokenLifetimeMinutes(int iTokenLifetimeMinutes)setTokenLifetimeMinutessets 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.StringtoString()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
-
equals
public boolean equals(java.lang.Object iThat)
equals is implemented so this can be used as a key in a HashMap- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
hashCode is implemented so this can be used as a key in a HashMap- Overrides:
hashCodein classjava.lang.Object
-
isNotEmpty
public boolean isNotEmpty()
-
toString
public java.lang.String toString()
To get the JWT value use
- Overrides:
toStringin classjava.lang.Object
-
getJWT
public java.lang.String getJWT() throws MSTRWebAPIExceptiongetJWTreturns a JWT that can be used directly to send to IServer- Returns:
- Throws:
MSTRWebAPIException
-
getTokenLifetimeMinutes
public int getTokenLifetimeMinutes()
getTokenLifetimeMinutesreturns 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)
setTokenLifetimeMinutessets 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-
-
-