Package com.google.auth.oauth2
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 com.google.auth.oauth2.AccessToken
AccessToken.Builder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate com.google.api.client.json.webtoken.JsonWebSignature
private static final long
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IdToken
Creates an IdToken given the encoded Json Web Signature.static IdToken
Creates an IdToken given the encoded Json Web Signature and JSON Factoryboolean
(package private) com.google.api.client.json.webtoken.JsonWebSignature
The JsonWebSignature as objectint
hashCode()
private void
toString()
private void
Methods inherited from class com.google.auth.oauth2.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:
hashCode
in classAccessToken
-
toString
- Overrides:
toString
in classAccessToken
-
equals
- Overrides:
equals
in classAccessToken
-
writeObject
- Throws:
IOException
-
readObject
- Throws:
ClassNotFoundException
IOException
-