This repository was archived by the owner on Mar 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathServerCommandLine.cs
More file actions
39 lines (31 loc) · 1.97 KB
/
Copy pathServerCommandLine.cs
File metadata and controls
39 lines (31 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using System.Diagnostics.CodeAnalysis;
using CommandLine;
namespace Microsoft.Azure.Batch.SoftwareEntitlement
{
/// <summary>
/// Command line arguments for running as a standalone server
/// </summary>
[Verb("server", HelpText = "Run as a standalone software entitlement server.")]
public sealed class ServerCommandLine : CommandLineBase
{
public const string DefaultServerUrl = "https://localhost:4443";
[Option("sign", HelpText = "Thumbprint of the certificate used to sign tokens (optional; if specified, all tokens must be signed).")]
public string SigningCertificateThumbprint { get; set; }
[Option("encrypt", HelpText = "Thumbprint of the certificate used to encrypt tokens (optional; if specified, all tokens must be encrypted).")]
public string EncryptionCertificateThumbprint { get; set; }
[Option("connection", HelpText = "Thumbprint of the certificate to pin for use with HTTPS (mandatory).")]
public string ConnectionCertificateThumbprint { get; set; }
[Option("url", HelpText = "The URL at which the server should process requests (defaults to '" + DefaultServerUrl + "'; must start with 'https:').")]
[SuppressMessage(
"Design",
"CA1056:Uri properties should not be strings",
Justification = "Must be a string to support our commandline.")]
public string ServerUrl { get; set; }
[Option("audience", HelpText = "[Internal] Audience to which all tokens must be addressed (optional, defaults to '" + Claims.DefaultAudience + "').")]
public string Audience { get; set; }
[Option("issuer", HelpText = "[Internal] Issuer by which all tokens must have been created (optional, defaults to '" + Claims.DefaultIssuer + "').")]
public string Issuer { get; set; }
[Option("exit-after-request", HelpText = "Server will automatically exit after processing one request.")]
public bool ExitAfterRequest { get; set; }
}
}