< Summary

Class:Azure.Iot.Hub.Service.Authentication.SharedAccessSignatureConstants
Assembly:Azure.Iot.Hub.Service
File(s):C:\Git\azure-sdk-for-net\sdk\iot\Azure.Iot.Hub.Service\src\Authentication\SharedAccessSignatureConstants.cs
Covered lines:1
Uncovered lines:0
Coverable lines:1
Total lines:30
Line coverage:100% (1 of 1)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.cctor()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\iot\Azure.Iot.Hub.Service\src\Authentication\SharedAccessSignatureConstants.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System;
 5
 6namespace Azure.Iot.Hub.Service.Authentication
 7{
 8    /// <summary>
 9    /// The constants used for building the IoT hub service shared access signature token.
 10    /// </summary>
 11    internal static class SharedAccessSignatureConstants
 12    {
 13        // The following keys are used to parse the relevant fields from an IoT hub connection string.
 14        internal const string HostNameIdentifier = "HostName";
 15        internal const string SharedAccessKeyIdentifier = "SharedAccessKey";
 16        internal const string SharedAccessPolicyIdentifier = "SharedAccessKeyName";
 17
 18        // The following keys are used for constructing the shared access signature token.
 19        // Example returned string:
 20        // SharedAccessSignature sr=<Audience>&sig=<Signature>&se=<ExpiresOnValue>[&skn=<KeyName>]
 21        internal const string SharedAccessSignatureIdentifier = "SharedAccessSignature";
 22        internal const string AudienceFieldName = "sr";
 23        internal const string SignatureFieldName = "sig";
 24        internal const string KeyNameFieldName = "skn";
 25        internal const string ExpiryFieldName = "se";
 26
 27        // The Unix time representation of January 1, 1970 midnight UTC.
 228        internal static readonly DateTime s_epochTime = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc);
 29    }
 30}

Methods/Properties

.cctor()