The newest version of Google Identity Toolkit has been released as Firebase Authentication. It includes upgraded client SDKs, open source UI libraries, session management and integrated email sending service for forgotten password flows.

New projects should use Firebase Authentication. To migrate an existing project from Identity Toolkit to Firebase Authentication, see the migration guide.

IdToken

public class IdToken

Class that represents an ID token.

Inherited Constant Summary

Field Summary

public static final Creator<IdToken> CREATOR

Public Method Summary

int
String
String
long
long
String
String
String
String
boolean
static IdToken
parse(String tokenString)
boolean
verifySignature(Certificate certificate)
void
writeToParcel(Parcel parcel, int flags)

Fields

public static final Creator<IdToken> CREATOR

Public Methods

public int describeContents ()

public String getAudience ()

Returns
  • the intended recipient of this JWT.

public String getEmail ()

Returns
  • the email address contained in this JWT.

public long getExpireAt ()

Returns
  • the time at which this JWT will expire, expressed as the number of seconds since 1970-01-01T0:0:0Z UTC.

public long getIssueAt ()

Returns
  • the time at which this JWT was issued, expressed as the number of seconds since 1970-01-01T0:0:0Z UTC.

public String getKeyId ()

public String getLocalId ()

Returns
  • the unique ID for this user in your app.

public String getProviderId ()

Returns

public String getTokenString ()

Returns
  • this IdToken encoded in as a base64 JWT format token string.
See Also

public boolean isExpired ()

Returns
  • true if the token has expired (i.e. the expire time is greater than current time). false otherwise.

public static IdToken parse (String tokenString)

Creates the IdToken from its string format, as returned from getTokenString().

Returns
  • the IdToken described by this string.

public boolean verifySignature (Certificate certificate)

Returns
  • true if the JWT is valid, false otherwise.

public void writeToParcel (Parcel parcel, int flags)