[cpp-sp] branch main updated: Add getAuthType impls for now.

Scott Cantor cantor.2 at osu.edu
Mon Dec 2 20:26:12 UTC 2024


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch main
in repository cpp-sp.

View the commit online:
http://git.shibboleth.net/view/?p=cpp-sp.git;a=commit;h=4d3dba232128ae8d7a70585e09947dafded232aa

The following commit(s) were added to refs/heads/main by this push:
     new 4d3dba23 Add getAuthType impls for now.
4d3dba23 is described below

commit 4d3dba232128ae8d7a70585e09947dafded232aa
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Dec 2 15:26:05 2024 -0500

    Add getAuthType impls for now.
---
 fastcgi/shibresponder.cpp |  4 ++++
 iis7_shib/IIS7Request.cpp | 11 +++++++++++
 2 files changed, 15 insertions(+)

diff --git a/fastcgi/shibresponder.cpp b/fastcgi/shibresponder.cpp
index 330cd119..3b75719e 100644
--- a/fastcgi/shibresponder.cpp
+++ b/fastcgi/shibresponder.cpp
@@ -122,6 +122,10 @@ public:
         const char* s = FCGX_GetParam("REMOTE_USER", m_req->envp);
         return s ? s : "";
     }
+    string getAuthType() const {
+        const char* s = FCGX_GetParam("AUTH_TYPE", m_req->envp);
+        return s ? s : "";
+    }
     string getRemoteAddr() const {
         string ret = AbstractSPRequest::getRemoteAddr();
         if (!ret.empty())
diff --git a/iis7_shib/IIS7Request.cpp b/iis7_shib/IIS7Request.cpp
index ef68c761..f8fb80d0 100644
--- a/iis7_shib/IIS7Request.cpp
+++ b/iis7_shib/IIS7Request.cpp
@@ -301,6 +301,17 @@ string IIS7Request::getRemoteUser() const
     return m_remoteUser;
 }
 
+string IIS7Request::getAuthType() const
+{
+    PCSTR type;
+    DWORD len;
+    HRESULT hr = m_ctx->GetServerVariable("AUTH_TYPE", &type, &len);
+    if (SUCCEEDED(hr)) {
+        return string(type);
+    }
+    return "";
+}
+
 const char* IIS7Request::getRequestBody() const
 {
     if (m_gotBody) {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list