-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Concrete types for credentials (#2154)
* Update System.Web.Identity to latest * Fix #2152
- Loading branch information
1 parent
e25e9eb
commit d527fdd
Showing
15 changed files
with
316 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
src/Azure.IIoT.OpcUa.Publisher.Models/src/UserIdentityModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
// ------------------------------------------------------------ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information. | ||
// ------------------------------------------------------------ | ||
|
||
namespace Azure.IIoT.OpcUa.Publisher.Models | ||
{ | ||
using System.Runtime.Serialization; | ||
|
||
/// <summary> | ||
/// User identity model | ||
/// </summary> | ||
[DataContract] | ||
public sealed record class UserIdentityModel | ||
{ | ||
/// <summary> | ||
/// <para> | ||
/// For <see cref="CredentialType.UserName"/> authentication | ||
/// this is the name of the user. | ||
/// </para> | ||
/// <para> | ||
/// For <see cref="CredentialType.X509Certificate"/> authentication | ||
/// this is the subject name of the certificate that has been | ||
/// configured. | ||
/// Either <see cref="User"/> or <see cref="Thumbprint"/> must be | ||
/// used to select the certificate in the user certificate store. | ||
/// </para> | ||
/// <para> | ||
/// Not used for the other authentication types. | ||
/// </para> | ||
/// </summary> | ||
[DataMember(Name = "user", Order = 1, | ||
EmitDefaultValue = false)] | ||
public string? User { get; set; } | ||
|
||
/// <summary> | ||
/// <para> | ||
/// For <see cref="CredentialType.UserName"/> authentication | ||
/// this is the password of the user. | ||
/// </para> | ||
/// <para> | ||
/// For <see cref="CredentialType.X509Certificate"/> authentication | ||
/// this is the passcode to export the configured certificate's | ||
/// private key. | ||
/// </para> | ||
/// <para> | ||
/// Not used for the other authentication types. | ||
/// </para> | ||
/// </summary> | ||
[DataMember(Name = "password", Order = 2, | ||
EmitDefaultValue = false)] | ||
public string? Password { get; set; } | ||
|
||
/// <summary> | ||
/// <para> | ||
/// For <see cref="CredentialType.X509Certificate"/> authentication | ||
/// this is the thumbprint of the configured certificate to use. | ||
/// Either <see cref="User"/> or <see cref="Thumbprint"/> must be | ||
/// used to select the certificate in the user certificate store. | ||
/// </para> | ||
/// <para> | ||
/// Not used for the other authentication types. | ||
/// </para> | ||
/// </summary> | ||
[DataMember(Name = "thumbprint", Order = 3, | ||
EmitDefaultValue = false)] | ||
public string? Thumbprint { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.