Package com.twilio.rest.oauth.v1
Class Token
- java.lang.Object
-
- com.twilio.base.Resource
-
- com.twilio.rest.oauth.v1.Token
-
- All Implemented Interfaces:
Serializable
public class Token extends Resource
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TokenCreatorcreator(String grantType, String clientSid)booleanequals(Object o)static TokenfromJson(InputStream json, com.fasterxml.jackson.databind.ObjectMapper objectMapper)Converts a JSON InputStream into a Token object using the provided ObjectMapper.static TokenfromJson(String json, com.fasterxml.jackson.databind.ObjectMapper objectMapper)Converts a JSON String into a Token object using the provided ObjectMapper.StringgetAccessToken()ZonedDateTimegetAccessTokenExpiresAt()StringgetIdToken()StringgetRefreshToken()ZonedDateTimegetRefreshTokenExpiresAt()inthashCode()
-
-
-
Method Detail
-
creator
public static TokenCreator creator(String grantType, String clientSid)
-
fromJson
public static Token fromJson(String json, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Converts a JSON String into a Token object using the provided ObjectMapper.- Parameters:
json- Raw JSON StringobjectMapper- Jackson ObjectMapper- Returns:
- Token object represented by the provided JSON
-
fromJson
public static Token fromJson(InputStream json, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Converts a JSON InputStream into a Token object using the provided ObjectMapper.- Parameters:
json- Raw JSON InputStreamobjectMapper- Jackson ObjectMapper- Returns:
- Token object represented by the provided JSON
-
getAccessToken
public final String getAccessToken()
-
getRefreshToken
public final String getRefreshToken()
-
getIdToken
public final String getIdToken()
-
getRefreshTokenExpiresAt
public final ZonedDateTime getRefreshTokenExpiresAt()
-
getAccessTokenExpiresAt
public final ZonedDateTime getAccessTokenExpiresAt()
-
-