{"action":"closed","issue":{"url":"https://api.github.com/repos/yaronn/xml-crypto/issues/46","labels_url":"https://api.github.com/repos/yaronn/xml-crypto/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/yaronn/xml-crypto/issues/46/comments","events_url":"https://api.github.com/repos/yaronn/xml-crypto/issues/46/events","html_url":"https://github.com/yaronn/xml-crypto/issues/46","id":65187277,"number":46,"title":"How to add signature on AuthnRequest","user":{"login":"whirp","id":6770300,"avatar_url":"https://avatars.githubusercontent.com/u/6770300?v=3","gravatar_id":"","url":"https://api.github.com/users/whirp","html_url":"https://github.com/whirp","followers_url":"https://api.github.com/users/whirp/followers","following_url":"https://api.github.com/users/whirp/following{/other_user}","gists_url":"https://api.github.com/users/whirp/gists{/gist_id}","starred_url":"https://api.github.com/users/whirp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whirp/subscriptions","organizations_url":"https://api.github.com/users/whirp/orgs","repos_url":"https://api.github.com/users/whirp/repos","events_url":"https://api.github.com/users/whirp/events{/privacy}","received_events_url":"https://api.github.com/users/whirp/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-30T11:00:52Z","updated_at":"2015-09-24T04:42:50Z","closed_at":"2015-09-24T04:42:50Z","body":"Hello, \r\nI'm trying to add signature on my AuthnRequest with xml-crypto.\r\nI've tried to add some configuration to SamlStrategy but nothing appens on AuthnRequest XML.\r\n\r\n\r\nThis is the configuration  for Strategy : \r\n```javascript\r\npassport: {\r\n\t\t\tstrategy : 'saml',\r\n\t\t\tsaml : {\r\n\t\t\t\tentryPoint : 'https://idp.idp.it/samlsso',\r\n\t\t\t\tissuer : 'http://111.111.11.111:8000',\r\n\t\t\t\tcallbackUrl : 'http://111.111.11.111:8000/login/callback',\r\n\t\t\t\tidentifierFormat: 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient',\r\n        \t\tdecryptionPvk: fs.readFileSync('./config/saml.key'),\r\n        \t\tcert:'MII....Q==',\r\n        \t\tvalidateInResponseTo :true,\r\n        \t\tauthnContext : 'urn:oasis:names:tc:SAML:2.0:ac:classes:name1',\r\n        \t\tprotocol: 'http://',\r\n        \t\tattributeConsumingServiceIndex:0\r\n\t\t\t}\r\n\t\t}\r\n```\r\n\r\nThis how route the login request, but i don't know how to add signature on it\r\n```javascript\r\napp.get(\"/login\",\r\n\t\tpassport.authenticate(config.passport.strategy,\r\n\t\t{\r\n\t\t\tsuccessRedirect : \"/\",\r\n\t\t\tfailureRedirect : \"/login\",\r\n\t\t})\r\n\t);\r\n\r\n\tapp.post('/login/callback',\r\n\t\tpassport.authenticate(config.passport.strategy,\r\n\t\t\t{\r\n\t\t\t\tfailureRedirect: '/',\r\n\t\t\t\tfailureFlash: true\r\n\t\t\t}),\r\n\t\tfunction(req, res) {\r\n\t\t\tres.redirect('/');\r\n\t\t}\r\n\t);\r\n```\r\n\r\nThis is the SAML AuthnRequest xml : \r\n```xml\r\n<samlp:AuthnRequest xmlns:samlp=\"urn:oasis:names:tc:SAML:2.0:protocol\"\r\n                    ID=\"_6eefdebac845aec3b311\"\r\n                    Version=\"2.0\"\r\n                    IssueInstant=\"2015-03-30T09:47:12.835Z\"\r\n                    ProtocolBinding=\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST\"\r\n                    AssertionConsumerServiceURL=\"http://111.111.11.111:8000/login/callback\"\r\n                    Destination=\"https://idp.idp.it/samlsso\"\r\n                    >\r\n    <saml:Issuer xmlns:saml=\"urn:oasis:names:tc:SAML:2.0:assertion\">http://111.111.11.111:8000</saml:Issuer>\r\n    <samlp:NameIDPolicy xmlns:samlp=\"urn:oasis:names:tc:SAML:2.0:protocol\"\r\n                        Format=\"urn:oasis:names:tc:SAML:2.0:nameid-format:transient\"\r\n                        AllowCreate=\"true\"\r\n                        />\r\n    <samlp:RequestedAuthnContext xmlns:samlp=\"urn:oasis:names:tc:SAML:2.0:protocol\"\r\n                                 Comparison=\"exact\"\r\n                                 >\r\n        <saml:AuthnContextClassRef xmlns:saml=\"urn:oasis:names:tc:SAML:2.0:assertion\">urn:oasis:names:tc:SAML:2.0:ac:classes:name1</saml:AuthnContextClassRef>\r\n    </samlp:RequestedAuthnContext>\r\n</samlp:AuthnRequest>\r\n```\r\n"}}