private GetAuthDataValue ( |
||
credential | ||
timestamp | System.DateTime | |
리턴 | string |
public void GetAuthDataValueTest() { string clientToken = "client-token-abc"; string accessToken = "access-token-def"; string secret = "secret-shh"; DateTime timestamp = new DateTime(1918, 11, 11, 11, 00, 00, DateTimeKind.Utc); EdgeGridV1Signer signer = new EdgeGridV1Signer(); ClientCredential credential = new ClientCredential(clientToken, accessToken, secret); string authData = signer.GetAuthDataValue(credential, timestamp); Assert.IsTrue(Regex.IsMatch(authData, "EG1-HMAC-SHA256 client_token=client-token-abc;access_token=access-token-def;timestamp=19181111T11:00:00\\+0000;nonce=[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12};")); }