public class TosToken
extends java.lang.Object
TocResponse.getTosToken()
.
The TOS token is a BASE64 encoded string. The idea seems to be that a user might eventually stop agreeing to TOS updates, but may still have valid claims based on earlier TOS versions that must be serviced.
Modifier and Type | Field and Description |
---|---|
java.lang.String |
value
Decoded TOS token value.
|
int |
version
The version part of the token.
|
Modifier and Type | Method and Description |
---|---|
static TosToken |
decode(java.lang.String encoded)
Decode a token.
|
java.lang.String |
toString() |
public final java.lang.String value
public final int version
public static TosToken decode(java.lang.String encoded) throws java.lang.IllegalArgumentException, java.lang.NumberFormatException
encoded
- the base 64 encoded token stringjava.lang.IllegalArgumentException
- if the token string is not a base 64 value.java.lang.NumberFormatException
- if the version cannot be parsed into an integer value.public java.lang.String toString()
toString
in class java.lang.Object