The first link shows the following information about the IdentityClaims:
/// Returns an array indicating the type of claim that the adapter uses to identify the user being authenticated.
/// Note that although the property is an array, only the first element is currently used.
/// MUST BE ONE OF THE FOLLOWING
/// "https://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname"
/// "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn"
/// "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"
/// "https://schemas.microsoft.com/ws/2008/06/identity/claims/primarysid"
public string[] IdentityClaims
{
get { return new[] { "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn" }; }
}
So here you need the stuff to identify who the user is.
Regarding the network data, you get a an System.Net.HttpListenerRequest
in the BeginAuthentication
method of IAuthenticationAdapter
. From there, you must be able to get the client IP: https://learn.microsoft.com/en-us/dotnet/api/system.net.httplistenerrequest.remoteendpoint?view=netframework-4.7#system-net-httplistenerrequest-remoteendpoint
This will show the actual IP of the client if the connexion is made to the ADFS server directly, or the IP address of the WAP if that's coming from the WAP. But you already get the gist of it for getting other headers. Note that's always the case for regular clients/browsers. Unless they are going through a proxy, the HTTP header will not contain the client IP (that's at the discretion of the user agent to send headers). So your question could be addressed in a broader context, not specific to AD FS. Since that this is not a developper focused #ADFS tag. We do the best we can to provide support :( But at the end of the day, you might want to use a .Net focused community.
Also, you can actually find Tino's examples on his archived blog here: https://learn.microsoft.com/en-us/archive/blogs/cloudpfe/how-to-create-a-custom-authentication-provider-for-active-directory-federation-services-on-windows-server-2012-r2-part-1 on the top of the link already provided. Are they are plenty of open source MFA adapter to look at in GitHub if you are interrested to look at more complex solutions.