Skip to content
This repository has been archived by the owner on Jun 23, 2021. It is now read-only.

Commit

Permalink
#42 - improve the appearance of the messages in the UI
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidy committed May 24, 2020
1 parent 1bd05ee commit fc0bb28
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

Tester/

# User-specific files
*.suo
*.user
Expand Down
6 changes: 6 additions & 0 deletions privacyIDEAADFSProvider.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ VisualStudioVersion = 16.0.29609.76
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "privacyIDEAADFSProvider", "privacyIDEAADFSProvider\privacyIDEAADFSProvider.csproj", "{3A9A54D7-F23B-469C-BA61-8C69CBAF50F5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tester", "Tester\Tester.csproj", "{42F9F1AF-8AB7-4CBA-96E8-88B4B40538AE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -15,6 +17,10 @@ Global
{3A9A54D7-F23B-469C-BA61-8C69CBAF50F5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3A9A54D7-F23B-469C-BA61-8C69CBAF50F5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3A9A54D7-F23B-469C-BA61-8C69CBAF50F5}.Release|Any CPU.Build.0 = Release|Any CPU
{42F9F1AF-8AB7-4CBA-96E8-88B4B40538AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{42F9F1AF-8AB7-4CBA-96E8-88B4B40538AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{42F9F1AF-8AB7-4CBA-96E8-88B4B40538AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{42F9F1AF-8AB7-4CBA-96E8-88B4B40538AE}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
1 change: 1 addition & 0 deletions privacyIDEAADFSProvider/AuthPage.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<!-- End inputs are required by the presentation framework. -->
<p id="pageIntroductionText"><b>#C_MESSAGE#</b></p>
<p id="pageIntroductionText" style="color:red">#ERROR#</p>
<br />
<label for="otpvalue" class="block">#MESSAGE#</label>
<input id="otpvalue" name="otpvalue" type="password" value="" class="text" placeholder="#OTPTEXT#" size="35" />
<div id="submissionArea" class="submitMargin">
Expand Down
14 changes: 14 additions & 0 deletions privacyIDEAADFSProvider/OTPprovider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using System.Runtime.Serialization.Json;
using System.Xml;
using System.Xml.Linq;
using System.Collections;

namespace privacyIDEAADFSProvider
{
Expand Down Expand Up @@ -276,6 +277,19 @@ private string getJsonNode(string jsonResponse, string nodename)
try
{
var xml = XDocument.Load(JsonReaderWriterFactory.CreateJsonReader(Encoding.ASCII.GetBytes(jsonResponse), new XmlDictionaryReaderQuotas()));
//Console.WriteLine(xml);
// return a list if messages node is called
if (nodename == "messages")
{
string html_message = "";
IEnumerable<XElement> childElements =
from el in xml.Descendants(nodename).Elements()
select el;
foreach (XElement el in childElements)
html_message += el.Value+"<br/>";
return(html_message);
}

return xml.Descendants(nodename).Single().Value;
}
catch(Exception ex)
Expand Down
4 changes: 2 additions & 2 deletions privacyIDEAADFSProvider/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.3.8.1")]
[assembly: AssemblyFileVersion("1.3.8.1")]
[assembly: AssemblyVersion("1.3.8.2")]
[assembly: AssemblyFileVersion("1.3.8.2")]

0 comments on commit fc0bb28

Please sign in to comment.