Print

Print


@bbockelm commented on this pull request.


In src/XrdMacaroons/XrdMacaroonsHandler.cc:

> +        if (eq == std::string::npos)
+        {
+            return req.SendSimpleResp(400, NULL, NULL, "Invalid format for form-encoding", 0);
+        }
+        std::string key = token.substr(0, eq);
+        std::string value = token.substr(eq + 1);
+        //std::cout << "Found key " << key << ", value " << value << std::endl;
+        if (key == "grant_type")
+        {
+            found_grant_type = true;
+            if (value != "client_credentials")
+            {
+                return req.SendSimpleResp(400, NULL, NULL, "Invalid grant type specified.", 0);
+            }
+        }
+        else if (key == "expire_in")

Yes - this was a bit arbitrary on my part. I didn't know of an "obvious" candidate here.

Any reason that expires_in versus expire_in versus lifetime might be preferred? Shall we start flipping coins?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/xrootd/xrootd","title":"xrootd/xrootd","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/xrootd/xrootd"}},"updates":{"snippets":[{"icon":"PERSON","message":"@bbockelm commented on #883"}],"action":{"name":"View Pull Request","url":"https://github.com/xrootd/xrootd/pull/883#discussion_r242989272"}}} [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/xrootd/xrootd/pull/883#discussion_r242989272", "url": "https://github.com/xrootd/xrootd/pull/883#discussion_r242989272", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1