コード例 #1
0
        /// <summary>
        /// Creates a new instances on the Auth0 login client
        /// </summary>
        /// <param name="domain">The domain your want to log in to</param>
        /// <param name="clientId">The client ID</param>
        /// <param name="diagnostics">The <see cref="DiagnosticsHeader"/> which is sent along with the request. This is used for telemetry by Auth0. To opt out of this, specify a value of DiagnosticsHeader.Suppress</param>
        public Auth0Client(string domain, string clientId, DiagnosticsHeader diagnostics)
        {
            // If no diagnostics header structure was specified, then revert to the default one
            if (diagnostics == null)
            {
                diagnostics = DiagnosticsHeader.Default;
            }

            this.diagnostics = diagnostics;

            this.domain = domain;
            this.clientId = clientId;
            this.DeviceIdProvider = new Device();
        }
コード例 #2
0
 /// <summary>
 ///     Resets the <see cref="Default" /> and <see cref="Suppress" /> instances.
 /// </summary>
 public static void Reset()
 {
     _default = null;
     suppress = null;
 }
コード例 #3
0
 /// <summary>
 ///     Resets the <see cref="Default" /> and <see cref="Suppress" /> instances.
 /// </summary>
 public static void Reset()
 {
     _default = null;
     suppress = null;
 }
コード例 #4
0
        private static DiagnosticsHeader CreateDefault()
        {
            var sdkAssembly = typeof (DiagnosticsHeader).GetTypeInfo().Assembly;
            var sdkAssemblyName = sdkAssembly.GetName();

            var header = new DiagnosticsHeader(sdkAssemblyName);

            // Set windows version
            header.Environments = new[]
            {
                new DiagnosticsComponent(Info.SystemFamily, Info.SystemVersion)
            };

            return header;
        }