コード例 #1
0
 public RegisterModel(IConfiguration configuration,
                      IManagementConnection managementConnection,
                      IAuthenticationConnection authenticationConnection)
 {
     Configuration            = configuration;
     ManagementConnection     = managementConnection;
     AuthenticationConnection = authenticationConnection;
 }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AuthenticationApiClient" /> class.
        /// </summary>
        /// <param name="baseUri">Your Auth0 domain URI, e.g. https://tenant.auth0.com</param>
        /// <param name="connection">Optional <see cref="IAuthenticationConnection"/> used to influence connection behavior.
        /// Defaults to a freshly created <see cref="HttpClientAuthenticationConnection"/> that uses a single <see cref="HttpClient"/>.</param>
        /// <remarks>To use a custom <see cref="HttpClient"/> or <see cref="HttpMessageHandler"/> create a
        /// <see cref="HttpClientAuthenticationConnection"/> passing that into the constructor. e.g.
        /// <code>var client = new AuthenticationApiClient(new HttpClientAuthenticationConnection(myHttpClient));</code> or
        /// <code>var client = new AuthenticationApiClient(new HttpClientAuthenticationConnection(myHttpMessageHandler));</code> or
        /// </remarks>
        public AuthenticationApiClient(Uri baseUri, IAuthenticationConnection connection = null)
        {
            BaseUri = baseUri;
            if (connection == null)
            {
                var ownConnection = new HttpClientAuthenticationConnection();
                this.connection     = ownConnection;
                connectionToDispose = ownConnection;
            }
            else
            {
                this.connection = connection;
            }

            tokenUri = BuildUri("oauth/token");
        }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AuthenticationApiClient" /> class.
 /// </summary>
 /// <param name="domain">Your Auth0 domain name, e.g. tenant.auth0.com.</param>
 /// <param name="connection">Optional <see cref="IAuthenticationConnection"/> used to influence connection behavior.
 /// Defaults to a freshly created <see cref="HttpClientAuthenticationConnection"/> that uses a single <see cref="HttpClient"/>.</param>
 /// <remarks>To use a custom <see cref="HttpClient"/> or <see cref="HttpMessageHandler"/> create a
 /// <see cref="HttpClientAuthenticationConnection"/> passing that into the constructor. e.g.
 /// <code>var client = new AuthenticationApiClient(new HttpClientAuthenticationConnection(myHttpClient));</code> or
 /// <code>var client = new AuthenticationApiClient(new HttpClientAuthenticationConnection(myHttpMessageHandler));</code> or
 /// </remarks>
 public AuthenticationApiClient(string domain, IAuthenticationConnection connection = null)
     : this(new Uri($"https://{domain}"), connection)
 {
 }
コード例 #4
0
 public TestAuthenticationApiClient(string domain, IAuthenticationConnection connection) : base(domain, connection)
 {
 }
コード例 #5
0
 public TestAuthenticationApiClient(Uri baseUrl, IAuthenticationConnection connection = null) : base(baseUrl, connection)
 {
 }