Class IdToken
java.lang.Object
com.google.auth.oauth2.AccessToken
com.google.auth.oauth2.IdToken
- All Implemented Interfaces:
Serializable
Represents a temporary IdToken and its JsonWebSignature object
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class AccessToken
AccessToken.Builder -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate com.google.api.client.json.webtoken.JsonWebSignatureprivate static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IdTokenCreates an IdToken given the encoded Json Web Signature.static IdTokenCreates an IdToken given the encoded Json Web Signature and JSON Factoryboolean(package private) com.google.api.client.json.webtoken.JsonWebSignatureThe JsonWebSignature as objectinthashCode()private voidtoString()private voidMethods inherited from class AccessToken
getExpirationTime, getExpirationTimeMillis, getScopes, getTokenValue, newBuilder, toBuilder
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
jsonWebSignature
private transient com.google.api.client.json.webtoken.JsonWebSignature jsonWebSignature
-
-
Constructor Details
-
IdToken
private IdToken(String tokenValue, com.google.api.client.json.webtoken.JsonWebSignature jsonWebSignature) - Parameters:
tokenValue- String representation of the ID token.jsonWebSignature- JsonWebSignature as object
-
-
Method Details
-
create
Creates an IdToken given the encoded Json Web Signature.- Parameters:
tokenValue- String representation of the ID token.- Returns:
- returns com.google.auth.oauth2.IdToken
- Throws:
IOException- if JWT token parsing fails
-
create
public static IdToken create(String tokenValue, com.google.api.client.json.JsonFactory jsonFactory) throws IOException Creates an IdToken given the encoded Json Web Signature and JSON Factory- Parameters:
tokenValue- String representation of the ID token.jsonFactory- JsonFactory to use for parsing the provided token.- Returns:
- returns com.google.auth.oauth2.IdToken
- Throws:
IOException- if JWT token parsing fails
-
getJsonWebSignature
com.google.api.client.json.webtoken.JsonWebSignature getJsonWebSignature()The JsonWebSignature as object- Returns:
- returns com.google.api.client.json.webtoken.JsonWebSignature
-
hashCode
public int hashCode()- Overrides:
hashCodein classAccessToken
-
toString
- Overrides:
toStringin classAccessToken
-
equals
- Overrides:
equalsin classAccessToken
-
writeObject
- Throws:
IOException
-
readObject
- Throws:
ClassNotFoundExceptionIOException
-