예제 #1
0
 /// <summary>
 /// Retrieves the OpenID Configuration data for the Azure Attestation Service
 /// </summary>
 /// <remarks>
 /// Retrieves metadata about the attestation signing keys in use by the
 /// attestation service
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='tenantBaseUrl'>
 /// The tenant name, for example https://mytenant.attest.azure.net.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> GetAsync(this IMetadataConfigurationOperations operations, string tenantBaseUrl, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(tenantBaseUrl, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     Policy                           = new PolicyOperations(this);
     PolicyCertificates               = new PolicyCertificatesOperations(this);
     SigningCertificates              = new SigningCertificatesOperations(this);
     MetadataConfiguration            = new MetadataConfigurationOperations(this);
     BaseUri                          = "{tenantBaseUrl}";
     ApiVersion                       = "2018-09-01-preview";
     AcceptLanguage                   = "en-US";
     LongRunningOperationRetryTimeout = 30;
     GenerateClientRequestId          = true;
     SerializationSettings            = new JsonSerializerSettings
     {
         Formatting            = Newtonsoft.Json.Formatting.Indented,
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     CustomInitialize();
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }
예제 #3
0
 /// <summary>
 /// Retrieves the OpenID Configuration data for the Azure Attestation Service
 /// </summary>
 /// <remarks>
 /// Retrieves metadata about the attestation signing keys in use by the
 /// attestation service
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='tenantBaseUrl'>
 /// The tenant name, for example https://mytenant.attest.azure.net.
 /// </param>
 public static object Get(this IMetadataConfigurationOperations operations, string tenantBaseUrl)
 {
     return(operations.GetAsync(tenantBaseUrl).GetAwaiter().GetResult());
 }