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

Commit

Permalink
Extend the debug log
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidy committed Jan 2, 2019
1 parent b58a01f commit 4538f24
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions privacyIDEAADFSProvider/Adapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,11 @@ public IAuthenticationAdapterMetadata Metadata
/// <returns>new instance of IAdapterPresentationForm</returns>
public IAdapterPresentation BeginAuthentication(Claim identityClaim, HttpListenerRequest request, IAuthenticationContext authContext)
{
#if DEBUG
Debug.WriteLine(debugPrefix + " Claim value: " + identityClaim.Value);
#endif
// seperates the username from the domain
// TODO: Map the domain to the PI3A realm
// TODO: Map the domain to the ID3A realm
string[] tmp = identityClaim.Value.Split('\\');
if(tmp.Length > 1) username = tmp[1];
else username = tmp[0];
Expand All @@ -64,7 +67,7 @@ public IAdapterPresentation BeginAuthentication(Claim identityClaim, HttpListene
token = otp_prov.getAuthToken(admin_user, admin_pw);
// trigger a challenge (SMS, Mail ...) for the the user
#if DEBUG
Debug.WriteLine(debugPrefix + " User: " + username + " Server: " + privacyIDEArealm);
Debug.WriteLine(debugPrefix + " User: " + username + " Realm: " + privacyIDEArealm);
#endif
transaction_id = otp_prov.triggerChallenge(username, privacyIDEArealm, token);
}
Expand Down Expand Up @@ -167,7 +170,7 @@ bool ValidateProofData(IProofData proofData, IAuthenticationContext authContext)
string transaction_id = (string)proofData.Properties["transaction_id"];
// end fix
#if DEBUG
Debug.WriteLine(debugPrefix+"OTP Code: " + otpvalue + " User: " + session_user + " Server: " + session_realm + " Transaction_id" + transaction_id);
Debug.WriteLine(debugPrefix+"OTP Code: " + otpvalue + " User: " + session_user + " Server: " + session_realm + " Transaction_id: " + transaction_id);
#endif
return otp_prov.getAuthOTP(session_user, otpvalue, session_realm, transaction_id);
}
Expand Down

0 comments on commit 4538f24

Please sign in to comment.