Serializes this Credential instance to a dictionary. The dictionary containing the values for this Credential.
()
| 123 | /// </summary> |
| 124 | /// <returns>The dictionary containing the values for this Credential.</returns> |
| 125 | public Dictionary<string, object?> ToDictionary() |
| 126 | { |
| 127 | Dictionary<string, object?> toReturn = new Dictionary<string, object?>(); |
| 128 | |
| 129 | toReturn["credentialId"] = Base64UrlEncoder.Encode(this.id); |
| 130 | toReturn["isResidentCredential"] = this.IsResidentCredential; |
| 131 | if (this.RpId is not null) |
| 132 | { |
| 133 | toReturn["rpId"] = this.RpId; |
| 134 | } |
| 135 | toReturn["privateKey"] = this.PrivateKey; |
| 136 | toReturn["signCount"] = this.SignCount; |
| 137 | if (this.userHandle is not null) |
| 138 | { |
| 139 | toReturn["userHandle"] = Base64UrlEncoder.Encode(this.userHandle); |
| 140 | } |
| 141 | |
| 142 | return toReturn; |
| 143 | } |
| 144 | } |