Class IdToken

All Implemented Interfaces:
Serializable

public class IdToken extends AccessToken implements Serializable
Represents a temporary IdToken and its JsonWebSignature object
See Also:
  • 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

      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:
      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 class AccessToken
    • toString

      public String toString()
      Overrides:
      toString in class AccessToken
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class AccessToken
    • writeObject

      private void writeObject(ObjectOutputStream oos) throws IOException
      Throws:
      IOException
    • readObject

      private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException
      Throws:
      ClassNotFoundException
      IOException