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.JsonWebSignature
jsonWebSignature
private static long
serialVersionUID
-
Constructor Summary
Constructors Modifier Constructor Description private
IdToken(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 IdToken
create(java.lang.String tokenValue)
Creates an IdToken given the encoded Json Web Signature.static IdToken
create(java.lang.String tokenValue, com.google.api.client.json.JsonFactory jsonFactory)
Creates an IdToken given the encoded Json Web Signature and JSON Factoryboolean
equals(java.lang.Object obj)
(package private) com.google.api.client.json.webtoken.JsonWebSignature
getJsonWebSignature()
The JsonWebSignature as objectint
hashCode()
private void
readObject(java.io.ObjectInputStream ois)
java.lang.String
toString()
private void
writeObject(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:
hashCode
in classAccessToken
-
toString
public java.lang.String toString()
- Overrides:
toString
in classAccessToken
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in 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.ClassNotFoundException
java.io.IOException
-
-