Skip to content

Commit 2b913e4

Browse files
committed
chore: remove unneeded methods and classes
1 parent 349bc1b commit 2b913e4

File tree

6 files changed

+22
-882
lines changed

6 files changed

+22
-882
lines changed

Authentication/BasicAuthenticator.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ public override string AuthenticationType
8181
/// <param name="connector"></param>
8282
public override void Authenticate(RESTConnector connector)
8383
{
84+
if (connector.Headers == null)
85+
{
86+
connector.Headers = new Dictionary<string,string>();;
87+
}
8488
connector.Headers.Add("Authorization", Utility.CreateAuthorization(Username, Password));
8589
}
8690

Authentication/BearerTokenAuthenticator.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,24 @@ public override string AuthenticationType
7474
/// <param name="connector"></param>
7575
public override void Authenticate(RESTConnector connector)
7676
{
77+
if (connector.Headers == null)
78+
{
79+
connector.Headers = new Dictionary<string,string>();;
80+
}
81+
connector.Headers.Add("Authorization", string.Format("Bearer {0}", BearerToken));
82+
}
83+
84+
/// <summary>
85+
/// This method is called to authenticate an outgoing REST API request.
86+
/// Here, we'll just set the Authorization header to provide the necessary authentication info.
87+
/// </summary>
88+
/// <param name="connector"></param>
89+
public override void Authenticate(WSConnector connector)
90+
{
91+
if (connector.Headers == null)
92+
{
93+
connector.Headers = new Dictionary<string,string>();;
94+
}
7795
connector.Headers.Add("Authorization", string.Format("Bearer {0}", BearerToken));
7896
}
7997

Authentication/IamTokenManager.cs

Lines changed: 0 additions & 182 deletions
This file was deleted.

Authentication/Icp4dTokenManager.cs

Lines changed: 0 additions & 154 deletions
This file was deleted.

0 commit comments

Comments
 (0)