Class 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
    • 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)  
    • Field Detail

      • jsonWebSignature

        private transient com.google.api.client.json.webtoken.JsonWebSignature jsonWebSignature
    • Constructor Detail

      • IdToken

        private IdToken​(java.lang.String tokenValue,
                        com.google.api.client.json.webtoken.JsonWebSignature jsonWebSignature)
        Parameters:
        tokenValue - String representation of the ID token.
        jsonWebSignature - JsonWebSignature as object
    • 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
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class AccessToken
      • 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