Package com.google.auth.oauth2
Class IdToken
- java.lang.Object
-
- com.google.auth.oauth2.AccessToken
-
- com.google.auth.oauth2.IdToken
-
- All Implemented Interfaces:
java.io.Serializable
public class IdToken extends AccessToken implements java.io.Serializable
Represents a temporary IdToken and its JsonWebSignature object- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.auth.oauth2.AccessToken
AccessToken.Builder
-
-
Field Summary
Fields Modifier and Type Field Description private com.google.api.client.json.webtoken.JsonWebSignaturejsonWebSignatureprivate static longserialVersionUID
-
Constructor Summary
Constructors Modifier Constructor Description privateIdToken(java.lang.String tokenValue, com.google.api.client.json.webtoken.JsonWebSignature jsonWebSignature)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IdTokencreate(java.lang.String tokenValue)Creates an IdToken given the encoded Json Web Signature.static IdTokencreate(java.lang.String tokenValue, com.google.api.client.json.JsonFactory jsonFactory)Creates an IdToken given the encoded Json Web Signature and JSON Factorybooleanequals(java.lang.Object obj)(package private) com.google.api.client.json.webtoken.JsonWebSignaturegetJsonWebSignature()The JsonWebSignature as objectinthashCode()private voidreadObject(java.io.ObjectInputStream ois)java.lang.StringtoString()private voidwriteObject(java.io.ObjectOutputStream oos)-
Methods inherited from class com.google.auth.oauth2.AccessToken
getExpirationTime, getExpirationTimeMillis, getScopes, getTokenValue, newBuilder, toBuilder
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
jsonWebSignature
private transient com.google.api.client.json.webtoken.JsonWebSignature jsonWebSignature
-
-
Method Detail
-
create
public static IdToken create(java.lang.String tokenValue) throws java.io.IOException
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:
java.io.IOException- if JWT token parsing fails
-
create
public static IdToken create(java.lang.String tokenValue, com.google.api.client.json.JsonFactory jsonFactory) throws java.io.IOException
Creates an IdToken given the encoded Json Web Signature and JSON Factory- Parameters:
jsonFactory- JsonFactory to use for parsing the provided token.tokenValue- String representation of the ID token.- Returns:
- returns com.google.auth.oauth2.IdToken
- Throws:
java.io.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
public java.lang.String toString()
- Overrides:
toStringin classAccessToken
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classAccessToken
-
writeObject
private void writeObject(java.io.ObjectOutputStream oos) throws java.io.IOException- Throws:
java.io.IOException
-
readObject
private void readObject(java.io.ObjectInputStream ois) throws java.lang.ClassNotFoundException, java.io.IOException- Throws:
java.lang.ClassNotFoundExceptionjava.io.IOException
-
-