Skip to content

Commit ed2d95d

Browse files
committed
Merge branch 'develop'
2 parents 55b0aac + b99f412 commit ed2d95d

13 files changed

Lines changed: 54 additions & 16 deletions

File tree

Zephyr.Directory.Aws/Ldap.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
using Newtonsoft.Json.Linq;
1717

1818
using Zephyr.Directory.Ldap;
19+
using System.Net;
20+
using System.Net.Sockets;
21+
using System.Text;
1922

2023
// Allows Lambda Function's JSON Input to be converted into a .NET class
2124
[assembly: LambdaSerializer(typeof(Amazon.Lambda.Serialization.Json.JsonSerializer))]
@@ -45,6 +48,7 @@ public static string parse_data(LdapObject data,List<string> headers){
4548

4649
return csv_string;
4750
}
51+
4852
public static dynamic OutputConverter(LdapResponse response, OutputType? type){
4953
dynamic OutputObject = null;
5054
if(type == OutputType.Json){
@@ -70,6 +74,19 @@ public static dynamic OutputConverter(LdapResponse response, OutputType? type){
7074
}
7175
return OutputObject;
7276
}
77+
78+
public static string GetServerIPAddress()
79+
{
80+
string localIP;
81+
using (Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, 0))
82+
{
83+
socket.Connect("8.8.8.8", 80);
84+
IPEndPoint endpoint = socket.LocalEndPoint as IPEndPoint;
85+
localIP = endpoint.Address.ToString();
86+
}
87+
return localIP;
88+
}
89+
7390
public static dynamic ProcessRequest(LdapRequest request, ILambdaContext ctx)
7491
{
7592
bool isPing = request.Ping.HasValue;
@@ -106,8 +123,10 @@ public static dynamic ProcessRequest(LdapRequest request, ILambdaContext ctx)
106123
System.Diagnostics.FileVersionInfo fvi = System.Diagnostics.FileVersionInfo.GetVersionInfo(assembly.Location);
107124
string version = fvi.FileVersion;
108125
response.Message = "Hello From MyriAD (" + version + ").";
126+
response.Server = GetServerIPAddress();
109127
if (request.Ping == PingType.Echo)
110128
Console.WriteLine("Ping");
129+
output_data = response;
111130
}
112131
else
113132
{

Zephyr.Directory.Aws/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
1818
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
1919

20-
[assembly: AssemblyVersion("1.1.24219.0")]
21-
[assembly: AssemblyFileVersion("1.1.24219.0")]
20+
[assembly: AssemblyVersion("1.1.25055.0")]
21+
[assembly: AssemblyFileVersion("1.1.25055.0")]
2222

2323
// The following attributes are used to specify the signing key for the assembly,
2424
// if desired. See the Mono documentation for more information about signing.

Zephyr.Directory.Aws/cf-templates/cft-myriad-core-apigateway-only.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ Resources:
235235
Outputs:
236236
Version:
237237
Description: Cloud Formation Template Version
238-
Value: 1.1.24150.0
238+
Value: 1.1.25055.0
239239

240240
StackName:
241241
Description: The name of this stack.

Zephyr.Directory.Aws/cf-templates/cft-myriad-core-lambda-only.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Resources:
9797
Outputs:
9898
Version:
9999
Description: Cloud Formation Template Version
100-
Value: 1.1.24150.0
100+
Value: 1.1.25055.0
101101

102102
StackName:
103103
Description: The name of this stack.

Zephyr.Directory.Aws/cf-templates/cft-myriad-core.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ Resources:
316316
Outputs:
317317
Version:
318318
Description: Cloud Formation Template Version
319-
Value: 1.1.24150.0
319+
Value: 1.1.25055.0
320320

321321
StackName:
322322
Description: The name of this stack.

Zephyr.Directory.Aws/cf-templates/cft-myriad-init.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Resources:
110110
Outputs:
111111
Version:
112112
Description: Cloud Formation Template Version
113-
Value: 1.1.24150.0
113+
Value: 1.1.25055.0
114114

115115
StackName:
116116
Description: The name of this stack.

Zephyr.Directory.Aws/cf-templates/cft_Net_core.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ Resources:
403403
Outputs:
404404
Version:
405405
Description: Cloud Formation Template Version
406-
Value: 1.1.24150.0
406+
Value: 1.1.25055.0
407407

408408
StackName:
409409
Description: The name of this stack.

Zephyr.Directory.Aws/cf-templates/cft_Net_init.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ Resources:
223223
Outputs:
224224
Version:
225225
Description: Cloud Formation Template Version
226-
Value: 1.1.24150.0
226+
Value: 1.1.25055.0
227227

228228
StackName:
229229
Description: The name of this stack.

Zephyr.Directory.Ldap/LdapServer.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,10 @@ public LdapResponse Search(LdapRequest request, string searchBase, string search
496496
if(Token_present){
497497
continue_token = $"-0{Pick_up_Here}";
498498
PossibleNextToken = String.Concat((currentRecords+nextToken_client).ToString(), continue_token);
499+
} else {
500+
PossibleNextToken = null; // Search Is Complete.
499501
}
502+
500503
}
501504
}
502505
for(int index =0; index < results.Count; index++){

Zephyr.Directory.Ldap/Zephyr.Directory.Ldap.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
<PropertyGroup>
44
<TargetFramework>net6.0</TargetFramework>
55
<Configurations>Release;Debug</Configurations>
6+
<PackageId>Zephyr.Directory.Ldap</PackageId>
7+
<Version>1.1.25049.0</Version>
8+
<Authors>Guy Waguespack</Authors>
9+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
610
</PropertyGroup>
711

812
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />

0 commit comments

Comments
 (0)