public sealed class DeviceCredential : IMessage<DeviceCredential>, IEquatable<DeviceCredential>, IDeepCloneable<DeviceCredential>, IBufferMessage, IMessage
A server-stored device credential used for authentication.
[Optional] The time at which this credential becomes invalid. This
credential will be ignored for new client authentication requests after
this timestamp; however, it will not be automatically deleted.
public PublicKeyCredential PublicKey { get; set; }
A public key used to verify the signature of JSON Web Tokens (JWTs).
When adding a new device credential, either via device creation or via
modifications, this public key credential may be required to be signed by
one of the registry level certificates. More specifically, if the
registry contains at least one certificate, any new device credential
must be signed by one of the registry certificates. As a result,
when the registry contains certificates, only X.509 certificates are
accepted as device credentials. However, if the registry does
not contain a certificate, self-signed certificates and public keys will
be accepted. New device credentials must be different from every
registry-level certificate.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eDeviceCredential\u003c/code\u003e class is a server-stored credential used for device authentication in the Google Cloud IoT platform.\u003c/p\u003e\n"],["\u003cp\u003eThis class implements several interfaces including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, and inherits from the base \u003ccode\u003eObject\u003c/code\u003e class.\u003c/p\u003e\n"],["\u003cp\u003eThe class offers properties such as \u003ccode\u003eCredentialCase\u003c/code\u003e, \u003ccode\u003eExpirationTime\u003c/code\u003e which specifies the timestamp at which the credential expires, and \u003ccode\u003ePublicKey\u003c/code\u003e which contains a key used to verify JWT signatures.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eDeviceCredential\u003c/code\u003e class has two constructors: a default one and another that takes another \u003ccode\u003eDeviceCredential\u003c/code\u003e instance as an argument for initialization.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the documentation is version 2.2.0, however the current information is related to version 1.1.0.\u003c/p\u003e\n"]]],[],null,[]]