Skip to content

Commit

Permalink
Feature: Add 'https://' before dps service endpoint (#471)
Browse files Browse the repository at this point in the history
* add https

* fix unit test

Co-authored-by: crib <[email protected]>
  • Loading branch information
ChristopheRib63 and crib authored Mar 22, 2022
1 parent 80e727d commit 882c0b7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ public async Task GetEnrollmentCredentialsAsyncShouldGetDPSAttestation(string mo
// Assert
Assert.IsNotNull(result);
Assert.AreEqual("sn-007-888-abc-mac-a1-b2-c3-d4-e5-f6", result.RegistrationID);
Assert.AreEqual("FakeEndpoint", result.ProvisioningEndpoint);
Assert.AreEqual("https://FakeEndpoint", result.ProvisioningEndpoint);
Assert.AreEqual("Jsm0lyGpjaVYVP2g3FnmnmG9dI/9qU24wNoykUmermc=", result.SymmetricKey);
this.mockRepository.VerifyAll();
}
Expand Down Expand Up @@ -316,7 +316,7 @@ public async Task WhenEnrollmentGoupsNotExistGetEnrollmentCredentialsAsyncShould
// Assert
Assert.IsNotNull(result);
Assert.AreEqual("sn-007-888-abc-mac-a1-b2-c3-d4-e5-f6", result.RegistrationID);
Assert.AreEqual("FakeEndpoint", result.ProvisioningEndpoint);
Assert.AreEqual("https://FakeEndpoint", result.ProvisioningEndpoint);
Assert.AreEqual("Jsm0lyGpjaVYVP2g3FnmnmG9dI/9qU24wNoykUmermc=", result.SymmetricKey);

this.mockRepository.VerifyAll();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<MudGrid>
<MudItem xs="12">
<MudText Style="text-decoration:underline"><b>Service Endpoint</b></MudText>
<MudTextField @bind-Value="@Credentials.ProvisioningEndpoint" Class="mt-0" Variant="Variant.Text" Margin="Margin.Dense" ReadOnly="true" Adornment="Adornment.End" AdornmentIcon="@Icons.Filled.ContentCopy" OnAdornmentClick="@(() => ClipboardService.WriteTextAsync(Credentials.ProvisioningEndpoint))" />
<MudTextField @bind-Value="@Credentials.ProvisioningEndpoint" Class="mt-0" Variant="Variant.Text" Margin="Margin.Dense" ReadOnly="true" Adornment="Adornment.End" AdornmentIcon="@Icons.Filled.ContentCopy" OnAdornmentClick="@(() => ClipboardService.WriteTextAsync(Credentials.ProvisioningEndpoint))"/>
</MudItem>
<MudItem Class="mt-0" xs="12">
<MudText Style="text-decoration:underline"><b>Device Id</b></MudText>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public async Task<EnrollmentCredentials> GetEnrollmentCredentialsAsync(string de
{
SymmetricKey = symmetricKey,
RegistrationID = deviceId,
ProvisioningEndpoint = this.config.DPSEndpoint
ProvisioningEndpoint = $"https://{this.config.DPSEndpoint}"
};
}

Expand Down

0 comments on commit 882c0b7

Please sign in to comment.