{"swagger":"2.0","info":{"title":"IntegracjaWK","description":"Mock integracji Węzła Krajowego","version":"v1"},"schemes":["https","http"],"host":"api-cpa.gov.pl","tags":[{"name":"Węzeł Krajowy - login.gov.pl SignOn","description":""},{"name":"Węzeł Krajowy - login.gov.pl resolveArtifact","description":""},{"name":"Węzeł Krajowy - login.gov.pl Logout","description":""}],"paths":{"/resolveArtifact":{"post":{"tags":["Węzeł Krajowy - login.gov.pl resolveArtifact"],"description":"Żądanie ArtifactResolve, które dostawca usług musi wysłać do systemu login.gov.pl po otrzymaniu odpowiedzi na żądanie AuthnRequest.\n Istotne parametry wywołania:\n- Artifact - artefakt otrzymany w odpowiedzi na żądanie AuthnRequest,\n- ID - unikalny  identyfikator. Zgodnie z specyfikacją identyfikator musi zaczynać się od litery lub znaku podkreślenia,\n- IssueInstant - znacznik czasu możliwie najbliższy momentowi wysłania żądania,\n- Issuer - identyfikuje system Integratora w WK.","parameters":[{"name":"Payload","description":"Request Body - ArtifactResolve SOAP","required":true,"in":"body","schema":{"$ref":"#/definitions/SoapArtifactResolve"}}],"responses":{"200":{"description":""}},"consumes":["application/xml"],"produces":["application/xml"],"x-auth-type":"Application & Application User","x-throttling-tier":"Unlimited"}},"/singleLogoutService":{"post":{"tags":["Węzeł Krajowy - login.gov.pl Logout"],"description":"Żądanie wylogowania LogoutRequest wysyłane do systemu login.gov.pl.\n W parametrach NameID oraz SessionIndex powinny znajdować się dane otrzymane wcześniej w odszyfrowanej asercji.\n Żądanie LogoutRequest musi być podpisane przez Dostawcę Usług kluczem służącym do podpisu żądań autoryzacyjnych, podobnie jak żądanie AuthnRequest.","parameters":[{"name":"Payload","description":"Request Body - ArtifactResolve SOAP","required":true,"in":"body","schema":{"$ref":"#/definitions/SoapLogout"}}],"responses":{"200":{"description":""}},"consumes":["application/xml"],"produces":["application/xml"],"x-auth-type":"Application & Application User","x-throttling-tier":"Unlimited"}},"/singleSignOnService":{"post":{"tags":["Węzeł Krajowy - login.gov.pl SignOn"],"parameters":[{"name":"Payload","description":"Request Body","required":true,"in":"body","schema":{"$ref":"#/definitions/AuthnRequest"}}],"description":"Żądanie uwierzytelnienia - komunikat SAML AuthnRequest przekazywany do systemu login.gov.pl w celu rozpoczęcia procesu uwierzytelnienia. Żądanie AuthnRequest musi zostać wysłane metodą POST na adres usługi SSO w ukrytym formularzu o strukturze opisanej w oficjalnej dokuemtacji integratora DU. Najważniejsze z informacji, które muszą być zawarte w żądaniu AuthnRequest: \n- AssertionConsumerServiceURL - adres zwrotny,na który zostanie wysłanykomunikat SAML Response z asercją,\n- Destination - Adres usługi SSO systemu login.gov.pl, tj. https://domena/login/SingleSignOnService\n- ID - unikalny identyfikator. Zgodnie z specyfikacją identyfikator musi zaczynać się od litery lub znaku podkreślenia,\n- IssueInstant - znacznik czasu możliwie najbliższy momentowi wysłania żądania,\n- Issuer - identyfikuje system integratora w systemie login.gov.pl (Zgodny z SAML Issuer),\n- RequestedAttributes - lista żądanych atrybutów,\n- AuthnContextClassRef - poziom zaufania uwierzytelnienia,\n- ProtocolBinding - rodzaj protokołu komunikacyjnego SAML do zwrócenia odpowiedzi SAML Response,\n- ForceAuthn - wymuszenie ponownej autoryzacji (dozwolona wartość: true),\n- NameIDPolicy - parametr specyfikuje format zwróconego identyfikatora w odpowiedzi SML Response.\n\nŻądania o formacie podanym poniżej muszą zostać jeszcze zakodowane w formacie BASE64 przed wysłaniem na adres usługi SSO systemu login.gov.pl.","responses":{"200":{"description":""}},"consumes":["application/xml"],"produces":["application/xml"],"x-auth-type":"Application & Application User","x-throttling-tier":"Unlimited"}}},"definitions":{"SoapArtifactResolve":{"type":"object","xml":{"name":"Envelope","prefix":"soap11","namespace":"http://schemas.xmlsoap.org/soap/envelope/"},"properties":{"Header":{"type":"string","xml":{"prefix":"SOAP-ENV","name":"Header","namespace":"http://schemas.xmlsoap.org/soap/envelope/"},"example":" "},"Body":{"type":"object","xml":{"prefix":"soap11"},"properties":{"ArtifactResolve":{"type":"object","xml":{"prefix":"xaml2p","namespace":"urn:oasis:names:tc:SAML:2.0:protocol"},"properties":{"Saml2":{"type":"string","xml":{"attribute":true,"prefix":"xmlns","name":"saml2"},"example":"urn:oasis:names:tc:SAML:2.0:assertion"},"ID":{"type":"string","xml":{"attribute":true},"example":"_a274fd1649a1de423453e3da9ff9e326"},"IssueInstant":{"type":"string","xml":{"attribute":true},"example":"2019-12-10T09:57:49Z"},"Version":{"type":"string","xml":{"attribute":true},"example":"2.0"},"Issuer":{"type":"string","xml":{"prefix":"xaml2"},"example":"dostawca_uslug"},"Artifact":{"type":"string","xml":{"prefix":"xaml2p"},"example":"AAQAAFJ5nb7HH1nUx52nOYz1/gffN9F/wZbjPq0w7EMi9hgWKzr4c5iZoMc"},"Signature":{"$ref":"#/definitions/Signature"}}}}}}},"SoapLogout":{"type":"object","xml":{"name":"Envelope","prefix":"soap11","namespace":"http://schemas.xmlsoap.org/soap/envelope/"},"properties":{"Header":{"type":"string","xml":{"prefix":"SOAP-ENV","name":"Header","namespace":"http://schemas.xmlsoap.org/soap/envelope/"},"example":" "},"Body":{"type":"object","xml":{"prefix":"soap11"},"properties":{"LogoutRequest":{"type":"object","xml":{"prefix":"xaml2p","namespace":"urn:oasis:names:tc:SAML:2.0:protocol"},"properties":{"Saml2":{"type":"string","xml":{"attribute":true,"prefix":"xmlns","name":"saml2"},"example":"urn:oasis:names:tc:SAML:2.0:assertion"},"ID":{"type":"string","xml":{"attribute":true},"example":"_a274fd1649a1de423453e3da9ff9e326"},"IssueInstant":{"type":"string","xml":{"attribute":true},"example":"2019-12-10T09:57:49Z"},"Version":{"type":"string","xml":{"attribute":true},"example":"2.0"},"Issuer":{"type":"string","xml":{"prefix":"xaml2"},"example":"dostawca_uslug"},"NameID":{"type":"object","xml":{"prefix":"xaml2"},"example":"name_id","properties":{"Format":{"type":"string","xml":{"attribute":true},"example":"urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"}}},"Signature":{"$ref":"#/definitions/Signature"}}}}}}},"AuthnRequest":{"type":"object","properties":{"samlp":{"type":"string","xml":{"attribute":true,"name":"samlp","prefix":"xmlns"},"example":"urn:oasis:names:tc:SAML:2.0:protocol"},"ds":{"type":"string","xml":{"attribute":true,"prefix":"xmlns"},"example":"http://www.w3.org/2000/09/xmldsig#"},"eidas":{"type":"string","xml":{"attribute":true,"prefix":"xmlns"},"example":"http://eidas.europa.eu/saml-extensions"},"naturalperson":{"type":"string","xml":{"attribute":true,"name":"naturalperson","prefix":"xmlns"},"example":"http://eidas.europa.eu/attributes/naturalperson"},"xaml2":{"type":"string","xml":{"attribute":true,"prefix":"xmlns"},"example":"urn:oasis:names:tc:SAML:2.0:assertion"},"xenc":{"type":"string","xml":{"attribute":true,"prefix":"xmlns"},"example":"http://www.w3.org/2001/04/xmlenc#"},"AssertionConsumerServiceURL":{"type":"string","xml":{"attribute":true},"example":"https://dostawca_uslug.pl/du/AssertionConsumerService"},"Destination":{"type":"string","xml":{"attribute":true},"example":"https://symulator.login.gov.pl/login/SingleSignOnService"},"ForceAuthn":{"type":"string","xml":{"attribute":true},"example":"true"},"ID":{"type":"string","xml":{"attribute":true},"example":"_91c70e99c90df0c5ec43d5eee405e5e5"},"IsPassive":{"type":"string","xml":{"attribute":true},"example":"false"},"IssueInstant":{"type":"string","xml":{"attribute":true},"example":"2019-04-18T11:14:38.000Z"},"ProtocolBinding":{"type":"string","xml":{"attribute":true},"example":"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact"},"ProviderName":{"type":"string","xml":{"attribute":true},"example":"dostawca uslug"},"Version":{"type":"string","xml":{"attribute":true},"example":"2.0"},"Issuer":{"type":"string","xml":{"name":"Issuer","prefix":"samlp","namespace":"urn:oasis:names:tc:SAML:2.0:assertion"},"example":"dostawca_uslug"},"Signature":{"type":"object","xml":{"name":"Signature","prefix":"ds","namespace":"http://www.w3.org/2000/09/xmldsig#"},"properties":{"SignedInfo":{"type":"object","xml":{"name":"SignedInfo","prefix":"ds"},"properties":{"CanonicalizationMethod":{"type":"object","xml":{"name":"CanonicalizationMethod","prefix":"ds"},"properties":{"Algorithm":{"type":"string","xml":{"attribute":true},"example":"http://www.w3.org/2001/10/xml-exc-c14n#"}}},"SignatureMethod":{"type":"object","xml":{"name":"SignatureMethod","prefix":"ds"},"properties":{"Algorithm":{"type":"string","xml":{"attribute":true},"example":"http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"}}},"Reference":{"type":"object","xml":{"name":"Reference","prefix":"ds"},"properties":{"URI":{"type":"string","xml":{"attribute":true},"example":"#_91c70e99c90df0c5ec43d5eee405e5e5"},"Transforms":{"$ref":"#/definitions/TransformsObj"},"DigestMethod":{"type":"object","xml":{"prefix":"ds"},"properties":{"Algorithm":{"type":"string","xml":{"attribute":true},"example":"http://www.w3.org/2001/04/xmlenc#sha256"},"DigestValue":{"type":"string","xml":{"prefix":"ds"},"example":"ZEmTRdHp80RqmqPW/XPDCd09UezfkuJeAfKUpSui9Bw="}}}}}}},"SignatureValue":{"type":"string","xml":{"prefix":"ds"},"example":"rmdlBf0sL9mGmwbO99TZvlz07xVnlih9tG1ViFPSxdPBgJPT6V1goA2a0EXDUyW+O4hNMlMnzlig7F+vC2EQw=="},"KeyInfo":{"type":"object","xml":{"prefix":"ds"},"properties":{"X509Data":{"type":"object","xml":{"prefix":"ds"},"properties":{"X509Certificate":{"type":"string","xml":{"prefix":"ds"},"example":"MIICkjCCAXqgAwIBAgIIOjvW03P+nsIwDQYJKoZIhvcNAQELBQAwFzEVMBMGA1UEAwwMQ0FfSU5U X0xPR0lOMB4XDTE5MTExMjEzMjAxNFoXDTIxMTExMTEzMjAxNFowMTEaMBgGA1UEAwwRYW0uZGV2 LmNwYV9zaWdfZWMxEzARBgNVBAoMCkNQQV9HT1ZfUEwwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNC AAQeDOtsTOCZpmTOvLQs6rbAawh+RBZCUOCYaiZZ5j6uojyOKlZul6jGN+u7XBGAfxVjnTZKJp5g GR9B88oNDABho4GSMIGPMAkGA1UdEwQCMAAwHwYDVR0jBBgwFoAUqIkV8Oo0zBUxZVbFRzkZBxvm Gu4wNQYDVR0fBC4wLDAqoCigJoYkaHR0cDovL2NybC5lcHVhcC5nb3YucGwvSW50TG9naW4uY3Js MB0GA1UdDgQWBBSQT1oKmKXV+JdDFbiWfMfHYUsArTALBgNVHQ8EBAMCAsQwDQYJKoZIhvcNAQEL BQADggEBAI/ZxcDbbKSDzUtkF4jvpdT/bhRcSNef/GDhDWtjYtigDdkoL0a0QL1jxRQWRLWRffJX klwusAhkej4SPk95QMCebi8uZoWt1L7nUBO4kf/Rl0hc7L7wJu+HKNrSDEsjfRH6gLH54sYv2/wF nYlDmzaomoxH8FPKGA2BFOEzFfCawb2A+g92zabiue+dlnAkSUHOXuWl2/6UiPbwYgVqjE8INyGS 6r4yljkgi49kGTVRdFbTG/A+mpNdM5m6TspignIYu9dJhWoJqDJcvNtlTiHen6ZYrPLDxZh9AqaJ F2It9qwFjW9x2gYwADBS4tCB45pJSzWVbZA2rcJj7sSb1FY="}}}}}}},"Extensions":{"type":"object","xml":{"prefix":"xaml2p","namespace":"urn:oasis:names:tc:SAML:2.0:protocol"},"properties":{"SPType":{"type":"string","xml":{"prefix":"eidas","namespace":"http://eidas.europa.eu/saml-extensions"},"example":"public"},"RequestedAttributes":{"type":"array","xml":{"prefix":"eidas","namespace":"http://eidas.europa.eu/saml-extensions"},"items":{"$ref":"#/definitions/RequestedAttribute"},"example":[{"FriendlyName":"FamilyName","Name":"http://eidas.europa.eu/attributes/naturalperson/CurrentFamilyName"},{"FriendlyName":"FirstName","Name":"http://eidas.europa.eu/attributes/naturalperson/CurrentGivenName"},{"FriendlyName":"DateOfBirth","Name":"http://eidas.europa.eu/attributes/naturalperson/DateOfBirth"},{"FriendlyName":"PersonIdentifier","Name":"http://eidas.europa.eu/attributes/naturalperson/PersonIdentifier"}]}}},"NameIDPolicy":{"type":"object","xml":{"prefix":"saml2p","wrapped":false,"namespace":"urn:oasis:names:tc:SAML:2.0:protocol"},"properties":{"AllowCreate":{"type":"string","xml":{"attribute":true},"example":"true"},"Format":{"type":"string","xml":{"attribute":true},"example":"urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"}}},"RequestedAuthnContext":{"type":"object","xml":{"prefix":"saml2p","namespace":"urn:oasis:names:tc:SAML:2.0:protocol"},"properties":{"Comparison":{"type":"string","xml":{"attribute":true},"example":"minimum"},"AuthnContextClassRef":{"type":"string","xml":{"prefix":"saml","namespace":"urn:oasis:names:tc:SAML:2.0:assertion"},"example":"http://eidas.europa.eu/LoA/substantial"}}}},"xml":{"name":"AuthnRequest","prefix":"samlp"}},"RequestedAttribute":{"type":"object","xml":{"prefix":"eidas"},"properties":{"FriendlyName":{"type":"string","xml":{"attribute":true}},"Name":{"type":"string","xml":{"attribute":true}},"NameFormat":{"type":"string","xml":{"attribute":true},"example":"urn:oasis:names:tc:SAML:2.0:attrname-format:uri"},"isRequired":{"type":"string","xml":{"attribute":true},"example":"true"}}},"TransformsObj":{"type":"object","xml":{"name":"Transforms","prefix":"ds"},"properties":{"Transform":{"type":"array","items":{"$ref":"#/definitions/Transform"},"example":[{"Algorithm":"http://www.w3.org/2000/09/xmldsig#enveloped-signature","InclusiveNamespaces":{"xmlns":" ","PrefixList":" "}},{"Algorithm":"http://www.w3.org/2001/10/xml-exc-c14n#","InclusiveNamespaces":{"xmlns":"http://www.w3.org/2001/10/xml-exc-c14n#","PrefixList":"ds saml2 saml2p xenc"}}]}}},"Transform":{"type":"object","properties":{"Algorithm":{"type":"string","xml":{"attribute":true}},"InclusiveNamespaces":{"type":"object","properties":{"xmlns":{"type":"string","xml":{"attribute":true},"example":""},"PrefixList":{"type":"string","xml":{"attribute":true},"example":""}}}}},"Signature":{"type":"object","xml":{"name":"Signature","prefix":"ds","namespace":"http://www.w3.org/2000/09/xmldsig#"},"properties":{"SignedInfo":{"type":"object","xml":{"name":"SignedInfo","prefix":"ds"},"properties":{"CanonicalizationMethod":{"type":"object","xml":{"name":"CanonicalizationMethod","prefix":"ds"},"properties":{"Algorithm":{"type":"string","xml":{"attribute":true},"example":"http://www.w3.org/2001/10/xml-exc-c14n#"}}},"SignatureMethod":{"type":"object","xml":{"name":"SignatureMethod","prefix":"ds"},"properties":{"Algorithm":{"type":"string","xml":{"attribute":true},"example":"http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"}}},"Reference":{"type":"object","xml":{"name":"Reference","prefix":"ds"},"properties":{"URI":{"type":"string","xml":{"attribute":true},"example":"#_91c70e99c90df0c5ec43d5eee405e5e5"},"Transforms":{"$ref":"#/definitions/TransformsObj"},"DigestMethod":{"type":"object","xml":{"prefix":"ds"},"properties":{"Algorithm":{"type":"string","xml":{"attribute":true},"example":"http://www.w3.org/2001/04/xmlenc#sha256"},"DigestValue":{"type":"string","xml":{"prefix":"ds"},"example":"ZEmTRdHp80RqmqPW/XPDCd09UezfkuJeAfKUpSui9Bw="}}}}}}},"SignatureValue":{"type":"string","xml":{"prefix":"ds"},"example":"rmdlBf0sL9mGmwbO99TZvlz07xVnlih9tG1ViFPSxdPBgJPT6V1goA2a0EXDUyW+O4hNMlMnzlig7F+vC2EQw=="},"KeyInfo":{"type":"object","xml":{"prefix":"ds"},"properties":{"X509Data":{"type":"object","xml":{"prefix":"ds"},"properties":{"X509Certificate":{"type":"string","xml":{"prefix":"ds"},"example":"MIICkjCCAXqgAwIBAgIIOjvW03P+nsIwDQYJKoZIhvcNAQELBQAwFzEVMBMGA1UEAwwMQ0FfSU5U X0xPR0lOMB4XDTE5MTExMjEzMjAxNFoXDTIxMTExMTEzMjAxNFowMTEaMBgGA1UEAwwRYW0uZGV2 LmNwYV9zaWdfZWMxEzARBgNVBAoMCkNQQV9HT1ZfUEwwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNC AAQeDOtsTOCZpmTOvLQs6rbAawh+RBZCUOCYaiZZ5j6uojyOKlZul6jGN+u7XBGAfxVjnTZKJp5g GR9B88oNDABho4GSMIGPMAkGA1UdEwQCMAAwHwYDVR0jBBgwFoAUqIkV8Oo0zBUxZVbFRzkZBxvm Gu4wNQYDVR0fBC4wLDAqoCigJoYkaHR0cDovL2NybC5lcHVhcC5nb3YucGwvSW50TG9naW4uY3Js MB0GA1UdDgQWBBSQT1oKmKXV+JdDFbiWfMfHYUsArTALBgNVHQ8EBAMCAsQwDQYJKoZIhvcNAQEL BQADggEBAI/ZxcDbbKSDzUtkF4jvpdT/bhRcSNef/GDhDWtjYtigDdkoL0a0QL1jxRQWRLWRffJX klwusAhkej4SPk95QMCebi8uZoWt1L7nUBO4kf/Rl0hc7L7wJu+HKNrSDEsjfRH6gLH54sYv2/wF nYlDmzaomoxH8FPKGA2BFOEzFfCawb2A+g92zabiue+dlnAkSUHOXuWl2/6UiPbwYgVqjE8INyGS 6r4yljkgi49kGTVRdFbTG/A+mpNdM5m6TspignIYu9dJhWoJqDJcvNtlTiHen6ZYrPLDxZh9AqaJ F2It9qwFjW9x2gYwADBS4tCB45pJSzWVbZA2rcJj7sSb1FY="}}}}}}}},"basePath":"/mc/login/v1","securityDefinitions":{"default":{"type":"oauth2","authorizationUrl":"https://api-cpa.gov.pl/authorize","flow":"implicit","scopes":{}}}}