Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="InspireClientConfiguration"/> class.
 /// </summary>
 /// <param name="clientId">Contains the client identity to use for authentication.</param>
 /// <param name="clientAuthenticationMethod">Contains an optional client authentication method.</param>
 /// <param name="authorityUri">Contains the authority URI that will validate the client credentials and produce access token.</param>
 /// <param name="resourceUri">Contains the API resource URI that will be accessed by the client.</param>
 /// <param name="clientSecret">Contains an optional client secret key for client credential authentication method.</param>
 /// <param name="userId">Contains the user id used for password authentication method.</param>
 /// <param name="password">Contains the user password used for password authentication method.</param>
 /// <param name="useDiscovery">Contains a value indicating whether the authority discovery endpoint will be used for token endpoint lookup.</param>
 /// <param name="delegatedAccessToken">Contains an optional access token passed from the client software to be used in communication with the backchannel created within the SDK library.</param>
 public InspireClientConfiguration(string clientId, ClientAuthenticationMethods clientAuthenticationMethod,
                                   Uri authorityUri, Uri resourceUri, string clientSecret = "", string userId = "", string password = "", bool useDiscovery = true, string delegatedAccessToken = "")
 {
     this.ClientId             = clientId;
     this.AuthenticationMethod = clientAuthenticationMethod;
     this.AuthorityUri         = authorityUri;
     this.ResourceUri          = resourceUri;
     this.ClientSecret         = clientSecret;
     this.UserId               = userId;
     this.Password             = password;
     this.UseDiscovery         = useDiscovery;
     this.TargetResourceScopes = new[] { DefaultTargetResourceScope };
     this.DelegatedAccessToken = delegatedAccessToken;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="InspireClientConfiguration"/> class.
 /// </summary>
 /// <param name="clientId">Contains the client identity to use for authentication.</param>
 /// <param name="clientAuthenticationMethod">Contains an optional client authentication method.</param>
 /// <param name="authorityUri">Contains the authority URI that will validate the client credentials and produce access token.</param>
 /// <param name="resourceUri">Contains the API resource URI that will be accessed by the client.</param>
 /// <param name="clientSecret">Contains an optional client secret key for client credential authentication method.</param>
 /// <param name="userId">Contains the user id used for password authentication method.</param>
 /// <param name="password">Contains the user password used for password authentication method.</param>
 /// <param name="useDiscovery">Contains a value indicating whether the authority discovery endpoint will be used for token endpoint lookup.</param>
 /// <param name="delegatedAccessToken">Contains an optional access token passed from the client software to be used in communication with the backchannel created within the SDK library.</param>
 public InspireClientConfiguration(string clientId, ClientAuthenticationMethods clientAuthenticationMethod,
                                   string authorityUri, string resourceUri, string clientSecret = "", string userId = "", string password = "", bool useDiscovery = true, string delegatedAccessToken = "")
     : this(clientId, clientAuthenticationMethod, new Uri(authorityUri), new Uri(resourceUri), clientSecret, userId, password, useDiscovery, delegatedAccessToken)
 {
 }