This repository has been archived by the owner on Jan 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added support for TSE - Removed Security Token in URL - Added User Agent
- Loading branch information
1 parent
dc60c90
commit 6b4c2f4
Showing
33 changed files
with
676 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,3 +130,4 @@ FuelSDK-CSharp/fixer.awk | |
*.suo | ||
FuelSDK-CSharp.v12.suo | ||
FuelSDK-Test/App.config | ||
/.vs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using System; | ||
|
||
namespace FuelSDK | ||
{ | ||
public class AuthEndpointUriBuilder | ||
{ | ||
private const string legacyQuery = "legacy=1"; | ||
private readonly FuelSDKConfigurationSection configSection; | ||
|
||
public AuthEndpointUriBuilder(FuelSDKConfigurationSection configSection) | ||
{ | ||
this.configSection = configSection; | ||
} | ||
|
||
public string Build() | ||
{ | ||
UriBuilder uriBuilder = new UriBuilder(configSection.AuthenticationEndPoint); | ||
|
||
if (uriBuilder.Query.ToLower().Contains(legacyQuery)) | ||
{ | ||
return uriBuilder.Uri.AbsoluteUri; | ||
} | ||
|
||
if (uriBuilder.Query.Length > 1) | ||
uriBuilder.Query = uriBuilder.Query.Substring(1) + "&" + legacyQuery; | ||
else | ||
uriBuilder.Query = legacyQuery; | ||
|
||
return uriBuilder.Uri.AbsoluteUri; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System.Configuration; | ||
|
||
namespace FuelSDK | ||
{ | ||
class ConfigUtil | ||
{ | ||
public static FuelSDKConfigurationSection GetFuelSDKConfigSection() | ||
{ | ||
return (FuelSDKConfigurationSection)ConfigurationManager.GetSection("fuelSDK"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
namespace FuelSDK | ||
{ | ||
/// <summary> | ||
/// Contains the default endpoints for the SDK. | ||
/// </summary> | ||
public static class DefaultEndpoints | ||
{ | ||
/// <summary> | ||
/// The default SOAP endpoint | ||
/// </summary> | ||
public static string Soap => "https://webservice.s4.exacttarget.com/Service.asmx"; | ||
This comment has been minimized.
Sorry, something went wrong. |
||
|
||
/// <summary> | ||
/// The default authentication endpoint | ||
/// </summary> | ||
public static string Auth => "https://auth.exacttargetapis.com/v1/requestToken?legacy=1"; | ||
|
||
/// <summary> | ||
/// The default REST endpoint | ||
/// </summary> | ||
public static string Rest => "https://www.exacttargetapis.com"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Why is this hard-coded to the s4 stack?