Package com.google.auth.oauth2
Class IdToken
- java.lang.Object
-
- com.google.auth.oauth2.AccessToken
-
- com.google.auth.oauth2.IdToken
-
- All Implemented Interfaces:
Serializable
public class IdToken extends AccessToken implements 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
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IdToken
create(String tokenValue)
Creates an IdToken given the encoded Json Web Signature.static IdToken
create(String tokenValue, com.google.api.client.json.JsonFactory jsonFactory)
Creates an IdToken given the encoded Json Web Signature and JSON Factoryboolean
equals(Object obj)
int
hashCode()
String
toString()
-
Methods inherited from class com.google.auth.oauth2.AccessToken
getExpirationTime, getScopes, getTokenValue, newBuilder, toBuilder
-
-
-
-
Method Detail
-
create
public static IdToken create(String tokenValue) throws 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:
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:
jsonFactory
- JsonFactory to use for parsing the provided token.tokenValue
- String representation of the ID token.- Returns:
- returns com.google.auth.oauth2.IdToken
- Throws:
IOException
- if JWT token parsing fails
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAccessToken
-
toString
public String toString()
- Overrides:
toString
in classAccessToken
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classAccessToken
-
-