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.
Property Value
Type
Description
Google.Protobuf.WellKnownTypes.Timestamp
PublicKey
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\u003eThis page provides documentation for the \u003ccode\u003eDeviceCredential\u003c/code\u003e class within the \u003ccode\u003eGoogle.Cloud.Iot.V1\u003c/code\u003e namespace, which is used for server-stored device authentication credentials.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eDeviceCredential\u003c/code\u003e 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 is part of the \u003ccode\u003eGoogle.Cloud.Iot.V1.dll\u003c/code\u003e assembly.\u003c/p\u003e\n"],["\u003cp\u003eKey properties of \u003ccode\u003eDeviceCredential\u003c/code\u003e include \u003ccode\u003eCredentialCase\u003c/code\u003e, \u003ccode\u003eExpirationTime\u003c/code\u003e which defines when a credential is no longer valid, and \u003ccode\u003ePublicKey\u003c/code\u003e which holds the public key for JWT verification.\u003c/p\u003e\n"],["\u003cp\u003eThe class offers two constructors: a default constructor \u003ccode\u003eDeviceCredential()\u003c/code\u003e and another that allows the creation of a new \u003ccode\u003eDeviceCredential\u003c/code\u003e instance based off an existing \u003ccode\u003eDeviceCredential\u003c/code\u003e, \u003ccode\u003eDeviceCredential(DeviceCredential)\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThere are several versions of the \u003ccode\u003eDeviceCredential\u003c/code\u003e available in this documentation, spanning from version 1.0.0 to the latest, 2.2.0.\u003c/p\u003e\n"]]],[],null,[]]