Changeset 3178066
- Timestamp:
- 10/29/2024 01:53:02 PM (14 months ago)
- Location:
- mobile-bankid-integration/trunk
- Files:
-
- 5 added
- 68 edited
-
assets/certs/test.pem (added)
-
assets/certs/test_cacert.cer (added)
-
assets/css/login.css (added)
-
assets/css/login.full.css (added)
-
assets/css/setup.css (modified) (1 diff)
-
assets/css/setup.full.css (modified) (1 diff)
-
assets/js/login.full.js (modified) (1 diff)
-
assets/js/login.js (modified) (1 diff)
-
includes/admin/class-admin.php (modified) (1 diff)
-
includes/class-core.php (modified) (1 diff)
-
includes/integrations/woocommerce.php (modified) (3 diffs)
-
includes/wp-login/class-api.php (modified) (1 diff)
-
includes/wp-login/class-login.php (modified) (6 diffs)
-
mobile-bankid-integration.php (modified) (2 diffs)
-
readme.txt (modified) (3 diffs)
-
vendor/autoload.php (modified) (1 diff)
-
vendor/chillerlan/php-settings-container/README.md (modified) (1 diff)
-
vendor/chillerlan/php-settings-container/composer.json (modified) (1 diff)
-
vendor/chillerlan/php-settings-container/rules-magic-access.neon (added)
-
vendor/chillerlan/php-settings-container/src/SettingsContainerAbstract.php (modified) (6 diffs)
-
vendor/chillerlan/php-settings-container/src/SettingsContainerInterface.php (modified) (4 diffs)
-
vendor/composer/autoload_psr4.php (modified) (1 diff)
-
vendor/composer/autoload_real.php (modified) (2 diffs)
-
vendor/composer/autoload_static.php (modified) (3 diffs)
-
vendor/composer/installed.json (modified) (12 diffs)
-
vendor/composer/installed.php (modified) (6 diffs)
-
vendor/guzzlehttp/guzzle/CHANGELOG.md (modified) (1 diff)
-
vendor/guzzlehttp/guzzle/README.md (modified) (1 diff)
-
vendor/guzzlehttp/guzzle/composer.json (modified) (2 diffs)
-
vendor/guzzlehttp/guzzle/src/BodySummarizer.php (modified) (2 diffs)
-
vendor/guzzlehttp/guzzle/src/Client.php (modified) (2 diffs)
-
vendor/guzzlehttp/guzzle/src/ClientInterface.php (modified) (1 diff)
-
vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php (modified) (1 diff)
-
vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php (modified) (1 diff)
-
vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php (modified) (1 diff)
-
vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php (modified) (1 diff)
-
vendor/guzzlehttp/guzzle/src/Exception/RequestException.php (modified) (5 diffs)
-
vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php (modified) (10 diffs)
-
vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php (modified) (3 diffs)
-
vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php (modified) (4 diffs)
-
vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php (modified) (3 diffs)
-
vendor/guzzlehttp/guzzle/src/HandlerStack.php (modified) (3 diffs)
-
vendor/guzzlehttp/guzzle/src/MessageFormatter.php (modified) (1 diff)
-
vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php (modified) (1 diff)
-
vendor/guzzlehttp/guzzle/src/Middleware.php (modified) (3 diffs)
-
vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php (modified) (1 diff)
-
vendor/guzzlehttp/guzzle/src/RequestOptions.php (modified) (1 diff)
-
vendor/guzzlehttp/guzzle/src/RetryMiddleware.php (modified) (2 diffs)
-
vendor/guzzlehttp/guzzle/src/TransferStats.php (modified) (1 diff)
-
vendor/guzzlehttp/guzzle/src/Utils.php (modified) (2 diffs)
-
vendor/guzzlehttp/promises/CHANGELOG.md (modified) (1 diff)
-
vendor/guzzlehttp/promises/README.md (modified) (1 diff)
-
vendor/guzzlehttp/promises/composer.json (modified) (1 diff)
-
vendor/guzzlehttp/promises/src/Coroutine.php (modified) (1 diff)
-
vendor/guzzlehttp/promises/src/Each.php (modified) (3 diffs)
-
vendor/guzzlehttp/promises/src/FulfilledPromise.php (modified) (1 diff)
-
vendor/guzzlehttp/promises/src/Promise.php (modified) (2 diffs)
-
vendor/guzzlehttp/promises/src/PromiseInterface.php (modified) (1 diff)
-
vendor/guzzlehttp/promises/src/RejectedPromise.php (modified) (1 diff)
-
vendor/guzzlehttp/promises/src/RejectionException.php (modified) (1 diff)
-
vendor/guzzlehttp/promises/src/Utils.php (modified) (2 diffs)
-
vendor/guzzlehttp/psr7/CHANGELOG.md (modified) (1 diff)
-
vendor/guzzlehttp/psr7/README.md (modified) (4 diffs)
-
vendor/guzzlehttp/psr7/composer.json (modified) (1 diff)
-
vendor/guzzlehttp/psr7/src/CachingStream.php (modified) (1 diff)
-
vendor/guzzlehttp/psr7/src/HttpFactory.php (modified) (1 diff)
-
vendor/guzzlehttp/psr7/src/MultipartStream.php (modified) (1 diff)
-
vendor/guzzlehttp/psr7/src/Query.php (modified) (4 diffs)
-
vendor/guzzlehttp/psr7/src/Response.php (modified) (1 diff)
-
vendor/guzzlehttp/psr7/src/StreamWrapper.php (modified) (3 diffs)
-
vendor/guzzlehttp/psr7/src/UploadedFile.php (modified) (1 diff)
-
vendor/guzzlehttp/psr7/src/Uri.php (modified) (1 diff)
-
vendor/guzzlehttp/psr7/src/Utils.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
mobile-bankid-integration/trunk/assets/css/setup.css
r3070283 r3178066 1 #adminmenumain,#wpadminbar,#wpfooter,.update-nag{display:none}#wpcontent{margin-left:0}.wizard{position:absolute;top:50%;left:50%;transform:translate(-50%,0);width:500px;padding:20px}.wizard .footer-info{text-align:center;margin-bottom:20px;color:# 999}.wizard .steps{margin-bottom:20px}.wizard .steps ol{display:flex;justify-content:space-between;list-style:none;padding:0;margin:0}.wizard .steps ol li{width:25%;text-align:center;position:relative}.wizard .steps ol li:before{content:'';display:block;width:20px;height:20px;border-radius:50%;background:#ccc;margin:0 auto 5px}.wizard .steps ol li:after{content:'';display:block;width:100%;height:2px;background:#ccc;position:absolute;top:9px;left:-50%;z-index:-1}.wizard .steps ol li:first-child:after{content:none}.wizard .steps ol li.active:after,.wizard .steps ol li.active:before{background:#1e8cbe}.wizard .steps ol li.done:after,.wizard .steps ol li.done:before{background:#1e8cbe}.wizard .steps ol li.done:before{content:'\f147';font:400 18px/1 dashicons;display:block;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;color:#fff}.wizard .steps ol li.active:after{background:#1e8cbe}.wizard .steps ol li.animate-done:before{animation:wizard-animate-done .5s ease-in}.wizard .steps ol li.animate-active:after,.wizard .steps ol li.animate-active:before{animation:wizard-animate-active .5s ease-in}@keyframes wizard-animate-done{0%{font:400 1px/1 dashicons}100%{font:400 18px/1 dashicons}}@keyframes wizard-animate-active{0%{background:#ccc}100%{background:#1e8cbe}}#wizard-content{background:#fff;padding:20px;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.13)}#wizard-content ul{list-style:none;padding:0;margin-left:30px}#wizard-content ul li::before{content:" - ";font-weight:700}#wizard-content .form-group{margin-bottom:10px}#wizard-content .form-group label{display:block;margin-bottom:5px}#wizard-content .form-group input[type=password],#wizard-content .form-group input[type=text],#wizard-content .form-group input[type=url]{width:100%;padding:5px;border:1px solid #ccc;border-radius:3px}#wizard-modal{display:none;position:fixed;z-index:9999;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:rgba(0,0,0,.4)}#wizard-modal-content{background-color:#fefefe;margin:15% auto;padding:20px;border:1px solid #888;width:50%}#wizard-modal-content p{text-align:center}#wizard-modal-footer{text-align:end}@media screen and (max-width:600px){.wizard{width:90%;padding:20px 10px}}1 #adminmenumain,#wpadminbar,#wpfooter,.update-nag{display:none}#wpcontent{margin-left:0}.wizard{position:absolute;top:50%;left:50%;transform:translate(-50%,0);width:500px;padding:20px}.wizard .footer-info{text-align:center;margin-bottom:20px;color:#4a4a4a}.wizard .steps{margin-bottom:20px}.wizard .steps ol{display:flex;justify-content:space-between;list-style:none;padding:0;margin:0}.wizard .steps ol li{width:25%;text-align:center;position:relative}.wizard .steps ol li:before{content:'';display:block;width:20px;height:20px;border-radius:50%;background:#ccc;margin:0 auto 5px}.wizard .steps ol li:after{content:'';display:block;width:100%;height:2px;background:#ccc;position:absolute;top:9px;left:-50%;z-index:-1}.wizard .steps ol li:first-child:after{content:none}.wizard .steps ol li.active:after,.wizard .steps ol li.active:before{background:#1e8cbe}.wizard .steps ol li.done:after,.wizard .steps ol li.done:before{background:#1e8cbe}.wizard .steps ol li.done:before{content:'\f147';font:400 18px/1 dashicons;display:block;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important;color:#fff}.wizard .steps ol li.active:after{background:#1e8cbe}.wizard .steps ol li.animate-done:before{animation:wizard-animate-done .5s ease-in}.wizard .steps ol li.animate-active:after,.wizard .steps ol li.animate-active:before{animation:wizard-animate-active .5s ease-in}@keyframes wizard-animate-done{0%{font:400 1px/1 dashicons}100%{font:400 18px/1 dashicons}}@keyframes wizard-animate-active{0%{background:#ccc}100%{background:#1e8cbe}}#wizard-content{background:#fff;padding:20px;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.13)}#wizard-content ul{list-style:none;padding:0;margin-left:30px}#wizard-content ul li::before{content:" - ";font-weight:700}#wizard-content .form-group{margin-bottom:10px}#wizard-content .form-group label{display:block;margin-bottom:5px}#wizard-content .form-group input[type=password],#wizard-content .form-group input[type=text],#wizard-content .form-group input[type=url]{width:100%;padding:5px;border:1px solid #ccc;border-radius:3px}#wizard-modal{display:none;position:fixed;z-index:9999;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:rgba(0,0,0,.4)}#wizard-modal-content{background-color:#fefefe;margin:15% auto;padding:20px;border:1px solid #888;width:50%}#wizard-modal-content p{text-align:center}#wizard-modal-footer{text-align:end}@media screen and (max-width:600px){.wizard{width:90%;padding:20px 10px}} -
mobile-bankid-integration/trunk/assets/css/setup.full.css
r3070283 r3178066 19 19 text-align: center; 20 20 margin-bottom: 20px; 21 color: # 999;21 color: #4a4a4a; 22 22 } 23 23 -
mobile-bankid-integration/trunk/assets/js/login.full.js
r3070283 r3178066 1 1 if (typeof jQuery === 'undefined') { 2 throw new Error(' This JavaScript requires jQuery');2 throw new Error('Unofficial Mobile BankID Integration requires jQuery on the login page.'); 3 3 } 4 4 5 varorderRef = null;6 varbankidRefreshId = null;5 let orderRef = null; 6 let bankidRefreshId = null; 7 7 8 jQuery(document).ready(function() { 9 // Add event listener to login button 10 jQuery('#bankid-login-button').on('click', function() { 11 // Send REST API request to start BankID identification 12 jQuery.ajax({ 13 url: mobile_bankid_integration_rest_api + '/identify', 14 type: 'POST', 15 dataType: 'json', 16 success: function(data) { 17 if (data.orderRef !== null) { 18 loginPage(data.autoStartToken); 8 jQuery(document).ready(function () { 9 function initializeLoginPage(autoStartToken) { 10 const loginButtonContainer = jQuery("#bankid-login-button").parent().parent(); 11 const bankIdLoginContainer = jQuery('#bankid-login-container'); 19 12 20 // Save orderRef 13 const statusElement = jQuery('#bankid-status'); 14 statusElement.text(mobile_bankid_integration_login_localization.qr_instructions); 15 16 const cancelButton = jQuery('#cancel_bankid'); 17 cancelButton.on('click', cancelBankIdLogin); 18 19 const openBankidButton = jQuery('#open_bankid'); 20 openBankidButton.attr('href', `https://app.bankid.com/?autostarttoken=${autoStartToken}&redirect=null`); 21 22 loginButtonContainer.after(bankIdLoginContainer); 23 loginButtonContainer.hide(); 24 25 jQuery('h2').not('#bankid-login-h2').addClass('bankid-login-hidden'); 26 27 bankIdLoginContainer.show(); 28 29 jQuery('#login').addClass('bankid-login'); 30 } 31 32 async function handleStatus() { 33 if (orderRef === null) { 34 return; 35 } 36 37 try { 38 const response = await fetch(`${mobile_bankid_integration_rest_api}/status?orderRef=${orderRef}`); 39 const data = await response.json(); 40 41 if (data.qr !== null) { 42 jQuery('#bankid-qr-code').attr('src', data.qr); 43 44 if (! jQuery('#bankid-qr-code-loading').hasClass('hidden')) { 45 jQuery('#bankid-qr-code-loading').addClass('hidden'); 46 } 47 } 48 49 if (data.status === 'failed' && data.hintCode === 'startFailed') { 50 identify((data) => { 21 51 orderRef = data.orderRef; 52 const open_on_this_device = jQuery('#open_bankid'); 53 open_on_this_device.attr('href', `https://app.bankid.com/?autostarttoken=${data.autoStartToken}&redirect=null`); 54 }); 55 return; 56 } 22 57 23 // Show QR code 24 bankidRefreshId = setInterval(status, 1000); 58 handleStatusSwitch(data.status); 59 if (data.hintCode !== null) { 60 handleHintCode(data.hintCode); 61 } 62 63 updateQRCodeTimeLeft(data.time_since_auth); 64 } catch (error) { 65 displayErrorMessage(mobile_bankid_integration_login_localization.something_went_wrong); 66 console.error("Something went wrong. Debug info:\n\n", error); 67 } 68 } 69 70 function handleStatusSwitch(status) { 71 switch (status) { 72 case 'expired': 73 displayErrorMessage(mobile_bankid_integration_login_localization.status_expired); 74 break; 75 case 'complete': 76 completeLogin(); 77 break; 78 case 'complete_no_user': 79 displayErrorMessage(mobile_bankid_integration_login_localization.status_complete_no_user); 80 break; 81 case 'failed': 82 displayErrorMessage(mobile_bankid_integration_login_localization.status_failed); 83 break; 84 } 85 } 86 87 function updateQRCodeTimeLeft(timeSinceAuth) { 88 const timeLeft = 30 - timeSinceAuth; 89 const timeLeftPercentage = (timeLeft / 30) * 100; 90 jQuery('#bankid-qr-code-timeleft').css('width', `${timeLeftPercentage}%`); 91 } 92 93 function handleHintCode(hintCode) { 94 const statusElement = jQuery('#bankid-status'); 95 const hintMessages = { 96 'userCancel': mobile_bankid_integration_login_localization.hintcode_userCancel, 97 'userSign': mobile_bankid_integration_login_localization.hintcode_userSign, 98 'startFailed': mobile_bankid_integration_login_localization.hintcode_startFailed, 99 'certificateErr': mobile_bankid_integration_login_localization.hintcode_certificateErr, 100 'default': mobile_bankid_integration_login_localization.qr_instructions 101 }; 102 statusElement.html(hintMessages[hintCode] || hintMessages['default']); 103 } 104 105 function displayErrorMessage(message) { 106 const statusElement = jQuery('#bankid-status'); 107 statusElement.html(message); 108 jQuery('#bankid-qr-code').attr('src', ''); 109 jQuery('#bankid-qr-code-container').hide(); 110 jQuery('#open_bankid').hide(); 111 jQuery('#bankid-login-container').addClass('error'); 112 orderRef = null; 113 clearInterval(bankidRefreshId); 114 } 115 116 function completeLogin() { 117 orderRef = null; 118 jQuery('#bankid-status').html(mobile_bankid_integration_login_localization.status_complete); 119 jQuery('#bankid-qr-code').attr('src', ''); 120 jQuery('#bankid-qr-code-container').hide(); 121 jQuery('#open_bankid').hide(); 122 window.location.href = mobile_bankid_integration_redirect_url; 123 clearInterval(bankidRefreshId); 124 } 125 126 function cancelBankIdLogin() { 127 const loginButtonContainer = jQuery("#bankid-login-button").parent().parent(); 128 const bankIdLoginContainer = jQuery("#bankid-login-container"); 129 bankIdLoginContainer.hide(); 130 loginButtonContainer.show(); 131 132 // Close accordions 133 jQuery('#bankid-login-container button.accordion-button').removeClass('active'); 134 jQuery('#bankid-login-container button.accordion-button').attr('aria-expanded', 'false'); 135 jQuery('#bankid-login-container button.accordion-button').next().slideUp(); 136 137 // Show loading spinner 138 jQuery('#bankid-qr-code-loading').removeClass('hidden'); 139 140 // Unhide qr code container 141 jQuery('#bankid-qr-code-container').show(); 142 143 jQuery('#login').removeClass('bankid-login'); 144 jQuery('.bankid-login-hidden').removeClass('bankid-login-hidden'); 145 clearInterval(bankidRefreshId); 146 } 147 148 async function identify(callback) { 149 try { 150 const response = await fetch(`${mobile_bankid_integration_rest_api}/identify`, { 151 method: 'POST', 152 headers: { 153 'Content-Type': 'application/json' 25 154 } 26 } ,27 error: function(data) {28 // Show error message29 console.log("Something went wrong with BankID identify request.");155 }); 156 const data = await response.json(); 157 if (data.orderRef === null) { 158 throw new Error('Order reference is null'); 30 159 } 160 callback(data); 161 } catch (error) { 162 console.error("Something went wrong with BankID identify request.", error); 163 } 164 } 165 166 jQuery('#bankid-login-button').on('click', function (event) { 167 event.preventDefault(); 168 identify((data) => { 169 initializeLoginPage(data.autoStartToken); 170 orderRef = data.orderRef; 171 bankidRefreshId = setInterval(handleStatus, 1000); 31 172 }); 32 173 }); 33 });34 174 35 function loginPage(autoStartToken) { 36 document.getElementById("bankid-login-button").parentElement.parentElement.innerHTML = '<h2>'+mobile_bankid_integration_login_localization.title+'</h2><p id="bankid-status">'+mobile_bankid_integration_login_localization.qr_instructions+'</p><img id="bankid-qr-code" src="" alt="'+mobile_bankid_integration_login_localization.qr_alt+'" /><br><br><a href="#" class="button wp-element-button" onclick="window.location.reload();">'+mobile_bankid_integration_login_localization.cancel+'</a><a style="margin-left: 5px;" target="_blank" id="open_bankid" href="https://app.bankid.com/?autostarttoken='+autoStartToken+'&redirect=null" class="button wp-element-button">'+mobile_bankid_integration_login_localization.open_on_this_device+'</a>'; 37 } 175 jQuery('#bankid-login-container button.accordion-button').on('click', function (event) { 176 event.preventDefault(); 177 jQuery(this).toggleClass('active'); 178 jQuery(this).attr('aria-expanded', jQuery(this).attr('aria-expanded') === 'true' ? 'false' : 'true'); 179 jQuery(this).next().slideToggle(); 180 }); 38 181 39 function status() { 40 if (orderRef === null || document.getElementById('bankid-qr-code').style.display == 'none') { 41 return; 42 } 43 // Send REST API request to get QR code 44 jQuery.ajax({ 45 url: mobile_bankid_integration_rest_api + '/status?orderRef=' + orderRef, 46 type: 'GET', 47 dataType: 'json', 48 success: function(data) { 49 if (data.qr !== null) { 50 // Show QR code 51 document.getElementById('bankid-qr-code').src = data.qr; 52 } 53 54 switch (data.status) { 55 case 'expired': 56 // Show error message 57 showErrorMessage(mobile_bankid_integration_login_localization.status_expired); 58 clearInterval(bankidRefreshId); 59 break; 60 case 'complete': 61 orderRef = null; 62 // Show success message 63 document.getElementById('bankid-status').innerHTML = mobile_bankid_integration_login_localization.status_complete; 64 document.getElementById('bankid-qr-code').src = ''; 65 document.getElementById('bankid-qr-code').style.display = 'none'; 66 document.getElementById('open_bankid').style.display = 'none'; 67 // Redirect to my account page 68 window.location.href = mobile_bankid_integration_redirect_url; 69 clearInterval(bankidRefreshId); 70 break; 71 case 'complete_no_user': 72 showErrorMessage(mobile_bankid_integration_login_localization.status_complete_no_user); 73 clearInterval(bankidRefreshId); 74 break; 75 case 'failed': 76 showErrorMessage(mobile_bankid_integration_login_localization.status_failed); 77 clearInterval(bankidRefreshId); 78 break; 79 } 80 if (data.hintCode !== null) { 81 switch (data.hintCode) { 82 case 'userCancel': 83 document.getElementById('bankid-status').innerHTML = mobile_bankid_integration_login_localization.hintcode_userCancel; 84 break; 85 case 'userSign': 86 document.getElementById('bankid-status').innerHTML = mobile_bankid_integration_login_localization.hintcode_userSign; 87 break; 88 case 'startFailed': 89 document.getElementById('bankid-status').innerHTML = mobile_bankid_integration_login_localization.hintcode_startFailed; 90 break; 91 case 'certificateErr': 92 document.getElementById('bankid-status').innerHTML = mobile_bankid_integration_login_localization.hintcode_certificateErr; 93 break; 94 default: 95 document.getElementById('bankid-status').innerHTML = mobile_bankid_integration_login_localization.qr_instructions; 96 break; 97 } 98 } 99 }, 100 error: function(data) { 101 if (orderRef === null) { 102 clearInterval(bankidRefreshId); 103 return; 104 } 105 // Show error message 106 document.getElementById('bankid-status').innerHTML = mobile_bankid_integration_login_localization.something_went_wrong; 107 document.getElementById('bankid-qr-code').src = ''; 108 document.getElementById('bankid-qr-code').style.display = 'none'; 109 document.getElementById('open_bankid').style.display = 'none'; 110 console.log("Something went wrong. Debug info:\n\n" + data); 111 clearInterval(bankidRefreshId); 182 jQuery('#bankid-qr-code-container').on('click', function (event) { 183 jQuery(this).toggleClass('full-screen'); 184 jQuery(this).attr('aria-expanded', jQuery(this).attr('aria-expanded') === 'true' ? 'false' : 'true'); 185 jQuery(this).attr('aria-label', jQuery(this).attr('aria-label') === mobile_bankid_integration_login_localization.qr_click_to_enlarge ? mobile_bankid_integration_login_localization.qr_click_to_shrink : mobile_bankid_integration_login_localization.qr_click_to_enlarge); 186 if (jQuery(this).hasClass('full-screen')) { 187 jQuery('#login').after(this); 188 jQuery('#login').hide(); 189 jQuery('#bankid-terms').hide(); 190 } else { 191 jQuery('#bankid-status').after(this); 192 jQuery('#login').show(); 193 jQuery('#bankid-terms').show(); 112 194 } 113 195 }); 114 } 115 116 function showErrorMessage(message) { 117 document.getElementById('bankid-status').innerHTML = message; 118 document.getElementById('bankid-qr-code').src = ''; 119 document.getElementById('bankid-qr-code').style.display = 'none'; 120 document.getElementById('open_bankid').style.display = 'none'; 121 orderRef = null; 122 clearInterval(bankidRefreshId); 123 } 196 }); -
mobile-bankid-integration/trunk/assets/js/login.js
r3070283 r3178066 1 if(typeof jQuery==="undefined"){throw new Error(" This JavaScript requires jQuery")}var orderRef=null;var bankidRefreshId=null;jQuery(document).ready(function(){jQuery("#bankid-login-button").on("click",function(){jQuery.ajax({url:mobile_bankid_integration_rest_api+"/identify",type:"POST",dataType:"json",success:function(data){if(data.orderRef!==null){loginPage(data.autoStartToken);orderRef=data.orderRef;bankidRefreshId=setInterval(status,1e3)}},error:function(data){console.log("Something went wrong with BankID identify request.")}})})});function loginPage(autoStartToken){document.getElementById("bankid-login-button").parentElement.parentElement.innerHTML="<h2>"+mobile_bankid_integration_login_localization.title+'</h2><p id="bankid-status">'+mobile_bankid_integration_login_localization.qr_instructions+'</p><img id="bankid-qr-code" src="" alt="'+mobile_bankid_integration_login_localization.qr_alt+'" /><br><br><a href="#" class="button wp-element-button" onclick="window.location.reload();">'+mobile_bankid_integration_login_localization.cancel+'</a><a style="margin-left: 5px;" target="_blank" id="open_bankid" href="https://app.bankid.com/?autostarttoken='+autoStartToken+'&redirect=null" class="button wp-element-button">'+mobile_bankid_integration_login_localization.open_on_this_device+"</a>"}function status(){if(orderRef===null||document.getElementById("bankid-qr-code").style.display=="none"){return}jQuery.ajax({url:mobile_bankid_integration_rest_api+"/status?orderRef="+orderRef,type:"GET",dataType:"json",success:function(data){if(data.qr!==null){document.getElementById("bankid-qr-code").src=data.qr}switch(data.status){case"expired":showErrorMessage(mobile_bankid_integration_login_localization.status_expired);clearInterval(bankidRefreshId);break;case"complete":orderRef=null;document.getElementById("bankid-status").innerHTML=mobile_bankid_integration_login_localization.status_complete;document.getElementById("bankid-qr-code").src="";document.getElementById("bankid-qr-code").style.display="none";document.getElementById("open_bankid").style.display="none";window.location.href=mobile_bankid_integration_redirect_url;clearInterval(bankidRefreshId);break;case"complete_no_user":showErrorMessage(mobile_bankid_integration_login_localization.status_complete_no_user);clearInterval(bankidRefreshId);break;case"failed":showErrorMessage(mobile_bankid_integration_login_localization.status_failed);clearInterval(bankidRefreshId);break}if(data.hintCode!==null){switch(data.hintCode){case"userCancel":document.getElementById("bankid-status").innerHTML=mobile_bankid_integration_login_localization.hintcode_userCancel;break;case"userSign":document.getElementById("bankid-status").innerHTML=mobile_bankid_integration_login_localization.hintcode_userSign;break;case"startFailed":document.getElementById("bankid-status").innerHTML=mobile_bankid_integration_login_localization.hintcode_startFailed;break;case"certificateErr":document.getElementById("bankid-status").innerHTML=mobile_bankid_integration_login_localization.hintcode_certificateErr;break;default:document.getElementById("bankid-status").innerHTML=mobile_bankid_integration_login_localization.qr_instructions;break}}},error:function(data){if(orderRef===null){clearInterval(bankidRefreshId);return}document.getElementById("bankid-status").innerHTML=mobile_bankid_integration_login_localization.something_went_wrong;document.getElementById("bankid-qr-code").src="";document.getElementById("bankid-qr-code").style.display="none";document.getElementById("open_bankid").style.display="none";console.log("Something went wrong. Debug info:\n\n"+data);clearInterval(bankidRefreshId)}})}function showErrorMessage(message){document.getElementById("bankid-status").innerHTML=message;document.getElementById("bankid-qr-code").src="";document.getElementById("bankid-qr-code").style.display="none";document.getElementById("open_bankid").style.display="none";orderRef=null;clearInterval(bankidRefreshId)}1 if(typeof jQuery==="undefined"){throw new Error("Unofficial Mobile BankID Integration requires jQuery on the login page.")}let orderRef=null;let bankidRefreshId=null;jQuery(document).ready(function(){function initializeLoginPage(autoStartToken){const loginButtonContainer=jQuery("#bankid-login-button").parent().parent();const bankIdLoginContainer=jQuery("#bankid-login-container");const statusElement=jQuery("#bankid-status");statusElement.text(mobile_bankid_integration_login_localization.qr_instructions);const cancelButton=jQuery("#cancel_bankid");cancelButton.on("click",cancelBankIdLogin);const openBankidButton=jQuery("#open_bankid");openBankidButton.attr("href",`https://app.bankid.com/?autostarttoken=${autoStartToken}&redirect=null`);loginButtonContainer.after(bankIdLoginContainer);loginButtonContainer.hide();jQuery("h2").not("#bankid-login-h2").addClass("bankid-login-hidden");bankIdLoginContainer.show();jQuery("#login").addClass("bankid-login")}async function handleStatus(){if(orderRef===null){return}try{const response=await fetch(`${mobile_bankid_integration_rest_api}/status?orderRef=${orderRef}`);const data=await response.json();if(data.qr!==null){jQuery("#bankid-qr-code").attr("src",data.qr);if(!jQuery("#bankid-qr-code-loading").hasClass("hidden")){jQuery("#bankid-qr-code-loading").addClass("hidden")}}if(data.status==="failed"&&data.hintCode==="startFailed"){identify(data=>{orderRef=data.orderRef;const open_on_this_device=jQuery("#open_bankid");open_on_this_device.attr("href",`https://app.bankid.com/?autostarttoken=${data.autoStartToken}&redirect=null`)});return}handleStatusSwitch(data.status);if(data.hintCode!==null){handleHintCode(data.hintCode)}updateQRCodeTimeLeft(data.time_since_auth)}catch(error){displayErrorMessage(mobile_bankid_integration_login_localization.something_went_wrong);console.error("Something went wrong. Debug info:\n\n",error)}}function handleStatusSwitch(status){switch(status){case"expired":displayErrorMessage(mobile_bankid_integration_login_localization.status_expired);break;case"complete":completeLogin();break;case"complete_no_user":displayErrorMessage(mobile_bankid_integration_login_localization.status_complete_no_user);break;case"failed":displayErrorMessage(mobile_bankid_integration_login_localization.status_failed);break}}function updateQRCodeTimeLeft(timeSinceAuth){const timeLeft=30-timeSinceAuth;const timeLeftPercentage=timeLeft/30*100;jQuery("#bankid-qr-code-timeleft").css("width",`${timeLeftPercentage}%`)}function handleHintCode(hintCode){const statusElement=jQuery("#bankid-status");const hintMessages={userCancel:mobile_bankid_integration_login_localization.hintcode_userCancel,userSign:mobile_bankid_integration_login_localization.hintcode_userSign,startFailed:mobile_bankid_integration_login_localization.hintcode_startFailed,certificateErr:mobile_bankid_integration_login_localization.hintcode_certificateErr,default:mobile_bankid_integration_login_localization.qr_instructions};statusElement.html(hintMessages[hintCode]||hintMessages["default"])}function displayErrorMessage(message){const statusElement=jQuery("#bankid-status");statusElement.html(message);jQuery("#bankid-qr-code").attr("src","");jQuery("#bankid-qr-code-container").hide();jQuery("#open_bankid").hide();jQuery("#bankid-login-container").addClass("error");orderRef=null;clearInterval(bankidRefreshId)}function completeLogin(){orderRef=null;jQuery("#bankid-status").html(mobile_bankid_integration_login_localization.status_complete);jQuery("#bankid-qr-code").attr("src","");jQuery("#bankid-qr-code-container").hide();jQuery("#open_bankid").hide();window.location.href=mobile_bankid_integration_redirect_url;clearInterval(bankidRefreshId)}function cancelBankIdLogin(){const loginButtonContainer=jQuery("#bankid-login-button").parent().parent();const bankIdLoginContainer=jQuery("#bankid-login-container");bankIdLoginContainer.hide();loginButtonContainer.show();jQuery("#bankid-login-container button.accordion-button").removeClass("active");jQuery("#bankid-login-container button.accordion-button").attr("aria-expanded","false");jQuery("#bankid-login-container button.accordion-button").next().slideUp();jQuery("#bankid-qr-code-loading").removeClass("hidden");jQuery("#bankid-qr-code-container").show();jQuery("#login").removeClass("bankid-login");jQuery(".bankid-login-hidden").removeClass("bankid-login-hidden");clearInterval(bankidRefreshId)}async function identify(callback){try{const response=await fetch(`${mobile_bankid_integration_rest_api}/identify`,{method:"POST",headers:{"Content-Type":"application/json"}});const data=await response.json();if(data.orderRef===null){throw new Error("Order reference is null")}callback(data)}catch(error){console.error("Something went wrong with BankID identify request.",error)}}jQuery("#bankid-login-button").on("click",function(event){event.preventDefault();identify(data=>{initializeLoginPage(data.autoStartToken);orderRef=data.orderRef;bankidRefreshId=setInterval(handleStatus,1e3)})});jQuery("#bankid-login-container button.accordion-button").on("click",function(event){event.preventDefault();jQuery(this).toggleClass("active");jQuery(this).attr("aria-expanded",jQuery(this).attr("aria-expanded")==="true"?"false":"true");jQuery(this).next().slideToggle()});jQuery("#bankid-qr-code-container").on("click",function(event){jQuery(this).toggleClass("full-screen");jQuery(this).attr("aria-expanded",jQuery(this).attr("aria-expanded")==="true"?"false":"true");jQuery(this).attr("aria-label",jQuery(this).attr("aria-label")===mobile_bankid_integration_login_localization.qr_click_to_enlarge?mobile_bankid_integration_login_localization.qr_click_to_shrink:mobile_bankid_integration_login_localization.qr_click_to_enlarge);if(jQuery(this).hasClass("full-screen")){jQuery("#login").after(this);jQuery("#login").hide();jQuery("#bankid-terms").hide()}else{jQuery("#bankid-status").after(this);jQuery("#login").show();jQuery("#bankid-terms").show()}})}); -
mobile-bankid-integration/trunk/includes/admin/class-admin.php
r3106088 r3178066 217 217 <label for="mobile-bankid-integration-terms"><?php esc_html_e( 'Terms to show with login (Supports HTML)', 'mobile-bankid-integration' ); ?></label> 218 218 <textarea name="mobile-bankid-integration-terms" id="mobile-bankid-integration-terms" rows="5"><?php // phpcs:ignore -- PHP tag needed to prevent whitespace in textarea. 219 echo wp_kses(220 get_option( 'mobile_bankid_integration_terms', __( 'By logging in using Mobile BankID you agree to our Terms of Service and Privacy Policy.', 'mobile-bankid-integration' ) ),221 array(222 'a' => array(223 'href' => array(),224 'title' => array(),225 'target' => array(),226 ),227 'br' => array(),228 'em' => array(),229 'strong' => array(),230 'i' => array(),231 )232 );233 // phpcs:ignore -- PHP tag needed to prevent whitespace in textarea.234 ?></textarea>219 echo wp_kses( 220 get_option( 'mobile_bankid_integration_terms', __( 'By logging in using Mobile BankID you agree to our Terms of Service and Privacy Policy.', 'mobile-bankid-integration' ) ), 221 array( 222 'a' => array( 223 'href' => array(), 224 'title' => array(), 225 'target' => array(), 226 ), 227 'br' => array(), 228 'em' => array(), 229 'strong' => array(), 230 'i' => array(), 231 ) 232 ); 233 // phpcs:ignore -- PHP tag needed to prevent whitespace in textarea. 234 ?></textarea> 235 235 <p class="description"><?php esc_html_e( 'Following HTML elements are supported: a, br, em, strong and i. All others will be escaped.', 'mobile-bankid-integration' ); ?></p> 236 236 </div> -
mobile-bankid-integration/trunk/includes/class-core.php
r3106088 r3178066 65 65 private function create_bankid_service() { 66 66 if ( 'test' === get_option( 'mobile_bankid_integration_env' ) ) { 67 $this->bankid_service = new BankID(); 67 $this->bankid_service = new BankID( 68 BankID::ENVIRONMENT_TEST, 69 MOBILE_BANKID_INTEGRATION_PLUGIN_DIR . 'assets/certs/test.pem', 70 MOBILE_BANKID_INTEGRATION_PLUGIN_DIR . 'assets/certs/test_cacert.cer', 71 null, 72 'qwerty123' 73 ); 68 74 } else { 69 75 $this->bankid_service = new BankID( -
mobile-bankid-integration/trunk/includes/integrations/woocommerce.php
r3106088 r3178066 106 106 } 107 107 ); 108 add_action( 'woocommerce_login_form_end', function () { 109 $this->login_container( 'div' ); 110 } ); 108 111 } 109 112 } … … 126 129 return; 127 130 } 128 add_action( 'woocommerce_checkout_before_customer_details', array( $this, 'checkout_block' ) );131 add_action( 'woocommerce_checkout_before_customer_details', array( $this, 'checkout_block' ), 10 ); 129 132 add_action( 'woocommerce_after_checkout_validation', array( $this, 'validate' ), 10, 2 ); 130 133 } … … 165 168 ?> 166 169 </div> 170 <?php 171 $login->login_container( 'div', array( 'wc-block-components-notice-banner', 'is-info' ) ); 172 ?> 167 173 </div> 168 174 <?php -
mobile-bankid-integration/trunk/includes/wp-login/class-api.php
r3106088 r3178066 61 61 * Handle status request. 62 62 * 63 * @return array 64 */ 65 public function status() : array{63 * @return array|\WP_Error 64 */ 65 public function status() { 66 66 $instance = Core::$instance; 67 67 -
mobile-bankid-integration/trunk/includes/wp-login/class-login.php
r3106088 r3178066 17 17 if ( get_option( 'mobile_bankid_integration_wplogin' ) === 'as_alternative' && ( get_option( 'mobile_bankid_integration_certificate' ) && get_option( 'mobile_bankid_integration_password' ) && get_option( 'mobile_bankid_integration_env' ) ) ) { 18 18 add_action( 'login_form', array( $this, 'login_button' ), 40 ); 19 add_action( 'login_footer', array( $this, 'login_container' ) ); 19 20 add_action( 20 21 'login_footer', … … 37 38 $redirect = '/wp-admin/'; 38 39 } 39 echo '<p><a href="#" target="_self" id="bankid-login-button" class="button wp-element-button" style="width: 100%; text-align: center; margin-bottom: 1em;">' . esc_html__( 'Login with BankID', 'mobile-bankid-integration' ) . '</a></p>'; 40 echo '<noscript><style>#bankid-login-button { display: none; height: 0; margin: 0; }</style></noscript>'; 40 ?> 41 <p> 42 <button id="bankid-login-button" class="button wp-element-button"><?php esc_html_e( 'Login with BankID', 'mobile-bankid-integration' ) ?></button> 43 </p> 44 <?php 41 45 $this->load_scripts( $redirect ); 46 } 47 48 /** 49 * Add login container to login page. 50 * 51 * @return void 52 */ 53 public function login_container($dom_element = 'form', $class = array()) { 54 if ( ! in_array( $dom_element, array( 'form', 'div', 'section' ), true ) ) { 55 $dom_element = 'form'; 56 } 57 ?> 58 <<?php echo esc_attr( $dom_element ); ?> id="bankid-login-container" class="<?php echo esc_attr( implode( ' ', $class ) ); ?>" style="display: none;"> 59 <h2 id="bankid-login-h2"><?php esc_html_e( 'Login with BankID', 'mobile-bankid-integration' ) ?></h2> 60 <p id="bankid-status"><?php esc_html_e( 'Scan the QR code with your Mobile BankID app.', 'mobile-bankid-integration' ) ?></p> 61 <div id="bankid-qr-code-container" role="button" aria-label="<?php esc_attr_e( 'Enlarge the QR code', 'mobile-bankid-integration' ) ?>"> 62 <img id="bankid-qr-code" src="" alt="<?php esc_attr_e( 'QR code', 'mobile-bankid-integration' ) ?>"> 63 <div id="bankid-qr-code-loading" aria-hidden="true"> 64 <div class="spinner"></div> 65 </div> 66 <div id="bankid-qr-code-timeleft" aria-hidden="true"></div> 67 </div> 68 <div class="accordion screen-reader-accordion" role="region"> 69 <button class="accordion-button" aria-expanded="false" aria-controls="bankid-screen-reader-help"><?php esc_html_e( 'If you use a screen reader', 'mobile-bankid-integration' ) ?><span class="icon" aria-hidden="true"></span></button> 70 <div id="bankid-screen-reader-help" class="accordion-content"> 71 <p><?php esc_html_e( 'The most common problem is that the QR code doesn\'t fit on the screen. Please try to:', 'mobile-bankid-integration' ) ?></p> 72 <ul> 73 <li><?php esc_html_e( 'Ensure that the screen is switched on and Screen Curtain or similar functions are switched off.', 'mobile-bankid-integration' ) ?></li> 74 <li><?php esc_html_e( 'Zoom out in your browser by pressing Ctrl or Cmd-0.', 'mobile-bankid-integration' ) ?></li> 75 <li><?php esc_html_e( 'Zoom out with magnification tools such as ZoomText.', 'mobile-bankid-integration' ) ?></li> 76 <li><?php esc_html_e( 'Ensure the browser window is maximized.', 'mobile-bankid-integration' ) ?></li> 77 <li><?php esc_html_e( 'Hold your phone in portrait mode at an arm\'s lengths distance from the screen when you scan the QR code.', 'mobile-bankid-integration' ) ?></li> 78 </ul> 79 <p><?php esc_html_e( 'You can also click on the QR code above for it to be displayed bigger.', 'mobile-bankid-integration' ) ?></p> 80 </div> 81 </div> 82 <a href="#" id="cancel_bankid" class="button wp-element-button"><?php esc_html_e( 'Cancel', 'mobile-bankid-integration' ) ?></a> 83 <a target="_blank" id="open_bankid" href="#" class="button wp-element-button" style="margin-left: 5px;"><?php esc_html_e( 'Start the BankID app', 'mobile-bankid-integration' ) ?></a> 84 </<?php echo esc_attr( $dom_element ); ?>> 85 <?php 42 86 } 43 87 … … 53 97 } 54 98 ?> 55 <p class="bankid-terms">99 <p id="bankid-terms" style="font-size: <?php echo( esc_html( strval( $font_size ) ) ); ?>rem;"> 56 100 <?php 57 101 echo wp_kses( … … 71 115 ?> 72 116 </p> 73 <style>74 .bankid-terms {75 text-align: center;76 font-size: <?php echo( esc_html( strval( $font_size ) ) ); ?>rem;77 margin-top: 0;78 padding-top: 0;79 }80 </style>81 117 <?php 82 118 } … … 97 133 'mobile_bankid_integration_login_localization', 98 134 array( 99 'title' => esc_html__( 'Login with BankID', 'mobile-bankid-integration' ), 135 'qr_click_to_enlarge' => esc_attr__( 'Enlarge the QR code', 'mobile-bankid-integration' ), 136 'qr_click_to_shrink' => esc_attr__( 'Shrink the QR code back to normal size', 'mobile-bankid-integration' ), 100 137 'qr_instructions' => esc_html__( 'Scan the QR code with your Mobile BankID app.', 'mobile-bankid-integration' ), 101 'qr_alt' => esc_html__( 'QR code', 'mobile-bankid-integration' ),102 'cancel' => esc_html__( 'Cancel', 'mobile-bankid-integration' ),103 'open_on_this_device' => esc_html__( 'Start the BankID app', 'mobile-bankid-integration' ),104 138 'status_expired' => esc_html__( 'BankID identification session has expired. Please try again.', 'mobile-bankid-integration' ), 105 139 'status_complete' => esc_html__( 'BankID identification completed. Redirecting...', 'mobile-bankid-integration' ), … … 116 150 ); 117 151 wp_add_inline_script( 'mobile-bankid-integration-login', 'var mobile_bankid_integration_rest_api = "' . rest_url( 'mobile-bankid-integration/v1/login' ) . '"; var mobile_bankid_integration_redirect_url = "' . $redirect . '";', 'before' ); 152 153 wp_enqueue_style( 'mobile-bankid-integration-login', MOBILE_BANKID_INTEGRATION_PLUGIN_URL . 'assets/css/login.css', array(), MOBILE_BANKID_INTEGRATION_VERSION ); 118 154 } 119 155 } -
mobile-bankid-integration/trunk/mobile-bankid-integration.php
r3106088 r3178066 3 3 Plugin Name: Mobile BankID Integration 4 4 Description: A plugin that allows you to integrate Mobile BankID with your WordPress site. 5 Version: 1. 35 Version: 1.4 6 6 Author: Jamie Blomerus 7 7 Author URI: https://github.com/jamieblomerus … … 14 14 15 15 // Define constants. 16 define( 'MOBILE_BANKID_INTEGRATION_VERSION', '1. 3' );16 define( 'MOBILE_BANKID_INTEGRATION_VERSION', '1.4' ); 17 17 define( 'MOBILE_BANKID_INTEGRATION_PLUGIN_FILE', __FILE__ ); 18 18 define( 'MOBILE_BANKID_INTEGRATION_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); -
mobile-bankid-integration/trunk/readme.txt
r3106189 r3178066 3 3 Tags: mobile bankid, bankid, authentication 4 4 Requires at least: 5.2 5 Tested up to: 6. 56 Stable tag: 1. 35 Tested up to: 6.7 6 Stable tag: 1.4 7 7 Requires PHP: 7.2 8 8 License: GPLv3 or later … … 48 48 == Changelog == 49 49 50 = 1.4 = 51 * Recreated the login screen to be more user-friendly, modern and accessible. 52 * Fixed a contrast issue within the setup wizard. 53 * Resolved a SSL verification issue which caused the plugin to not work with the BankID test environment. 54 50 55 = 1.3 = 51 56 * Added credits tab to admin page … … 84 89 == Upgrade Notice == 85 90 91 = 1.4 = 92 A major update that changes the login screen and fixes some bugs. 93 86 94 = 1.3 = 87 95 Fixes some bugs and adds some minor new features. -
mobile-bankid-integration/trunk/vendor/autoload.php
r3106088 r3178066 23 23 require_once __DIR__ . '/composer/autoload_real.php'; 24 24 25 return ComposerAutoloaderInit 98b78f29606e95d04bc35c9b41f7b376::getLoader();25 return ComposerAutoloaderInit157f05f27a3285b4e529ec8dec75a307::getLoader(); -
mobile-bankid-integration/trunk/vendor/chillerlan/php-settings-container/README.md
r3070283 r3178066 48 48 The `SettingsContainerInterface` (wrapped in`SettingsContainerAbstract`) provides plug-in functionality for immutable object properties and adds some fancy, like loading/saving JSON, arrays etc. 49 49 It takes an `iterable` as the only constructor argument and calls a method with the trait's name on invocation (`MyTrait::MyTrait()`) for each used trait. 50 51 A PHPStan ruleset to exclude errors generated by accessing magic properties on `SettingsContainerInterface` can be found in `rules-magic-access.neon`. 52 50 53 51 54 ### Simple usage -
mobile-bankid-integration/trunk/vendor/chillerlan/php-settings-container/composer.json
r3070283 r3178066 25 25 }, 26 26 "require-dev": { 27 "phan/phan": "^5.4",28 27 "phpmd/phpmd": "^2.15", 28 "phpstan/phpstan": "^1.11", 29 "phpstan/phpstan-deprecation-rules": "^1.2", 29 30 "phpunit/phpunit": "^10.5", 30 "squizlabs/php_codesniffer": "^3. 9"31 "squizlabs/php_codesniffer": "^3.10" 31 32 }, 32 33 "autoload": { 33 34 "psr-4": { 34 "chillerlan\\Settings\\": "src /"35 "chillerlan\\Settings\\": "src" 35 36 } 36 37 }, 37 38 "autoload-dev": { 38 39 "psr-4": { 39 "chillerlan\\SettingsTest\\": "tests /"40 "chillerlan\\SettingsTest\\": "tests" 40 41 } 41 42 }, 42 43 "scripts": { 43 44 "phpunit": "@php vendor/bin/phpunit", 44 "ph an": "@php vendor/bin/phan"45 "phpstan": "@php vendor/bin/phpstan" 45 46 }, 46 47 "config": { -
mobile-bankid-integration/trunk/vendor/chillerlan/php-settings-container/src/SettingsContainerAbstract.php
r3070283 r3178066 12 12 namespace chillerlan\Settings; 13 13 14 use InvalidArgumentException, ReflectionClass, ReflectionProperty;15 use function array_keys, get_object_vars, is_object, json_decode, 16 json_ encode, method_exists, property_exists, serialize, unserialize;14 use InvalidArgumentException, JsonException, ReflectionClass, ReflectionProperty; 15 use function array_keys, get_object_vars, is_object, json_decode, json_encode, 16 json_last_error_msg, method_exists, property_exists, serialize, unserialize; 17 17 use const JSON_THROW_ON_ERROR; 18 18 … … 21 21 /** 22 22 * SettingsContainerAbstract constructor. 23 * 24 * @phpstan-param array<string, mixed> $properties 23 25 */ 24 26 public function __construct(iterable|null $properties = null){ … … 147 149 */ 148 150 public function toJSON(int|null $jsonOptions = null):string{ 149 return json_encode($this, ($jsonOptions ?? 0)); 151 $json = json_encode($this, ($jsonOptions ?? 0)); 152 153 if($json === false){ 154 throw new JsonException(json_last_error_msg()); 155 } 156 157 return $json; 150 158 } 151 159 … … 154 162 */ 155 163 public function fromJSON(string $json):static{ 164 /** @phpstan-var array<string, mixed> $data */ 156 165 $data = json_decode($json, true, 512, JSON_THROW_ON_ERROR); 157 166 … … 161 170 /** 162 171 * @inheritdoc 172 * @return array<string, mixed> 163 173 */ 164 174 public function jsonSerialize():array{ … … 229 239 * @inheritdoc 230 240 * @see \chillerlan\Settings\SettingsContainerInterface::fromIterable() 241 * 242 * @param array<string, mixed> $data 231 243 */ 232 244 public function __unserialize(array $data):void{ -
mobile-bankid-integration/trunk/vendor/chillerlan/php-settings-container/src/SettingsContainerInterface.php
r3070283 r3178066 50 50 * 51 51 * The values will be run through the magic __get(), which may also call custom getters. 52 * 53 * @return array<string, mixed> 52 54 */ 53 55 public function toArray():array; … … 57 59 * 58 60 * The values will be run through the magic __set(), which may also call custom setters. 61 * 62 * @phpstan-param array<string, mixed> $properties 59 63 */ 60 64 public function fromIterable(iterable $properties):static; … … 62 66 /** 63 67 * Returns a JSON representation of the settings object 68 * 64 69 * @see \json_encode() 65 70 * @see \chillerlan\Settings\SettingsContainerInterface::toArray() 71 * 72 * @throws \JsonException 66 73 */ 67 74 public function toJSON(int|null $jsonOptions = null):string; … … 70 77 * Sets properties from a given JSON string 71 78 * 79 * @see \chillerlan\Settings\SettingsContainerInterface::fromIterable() 80 * 72 81 * @throws \Exception 73 82 * @throws \JsonException 74 * @see \chillerlan\Settings\SettingsContainerInterface::fromIterable()75 83 */ 76 84 public function fromJSON(string $json):static; -
mobile-bankid-integration/trunk/vendor/composer/autoload_psr4.php
r3106088 r3178066 9 9 'chillerlan\\Settings\\' => array($vendorDir . '/chillerlan/php-settings-container/src'), 10 10 'chillerlan\\QRCode\\' => array($vendorDir . '/chillerlan/php-qrcode/src'), 11 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http- message/src', $vendorDir . '/psr/http-factory/src'),11 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-factory/src', $vendorDir . '/psr/http-message/src'), 12 12 'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'), 13 13 'Personnummer\\' => array($vendorDir . '/personnummer/personnummer/src'), -
mobile-bankid-integration/trunk/vendor/composer/autoload_real.php
r3106088 r3178066 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 98b78f29606e95d04bc35c9b41f7b3765 class ComposerAutoloaderInit157f05f27a3285b4e529ec8dec75a307 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit 98b78f29606e95d04bc35c9b41f7b376', 'loadClassLoader'), true, true);27 spl_autoload_register(array('ComposerAutoloaderInit157f05f27a3285b4e529ec8dec75a307', 'loadClassLoader'), true, true); 28 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 29 spl_autoload_unregister(array('ComposerAutoloaderInit 98b78f29606e95d04bc35c9b41f7b376', 'loadClassLoader'));29 spl_autoload_unregister(array('ComposerAutoloaderInit157f05f27a3285b4e529ec8dec75a307', 'loadClassLoader')); 30 30 31 31 require __DIR__ . '/autoload_static.php'; 32 call_user_func(\Composer\Autoload\ComposerStaticInit 98b78f29606e95d04bc35c9b41f7b376::getInitializer($loader));32 call_user_func(\Composer\Autoload\ComposerStaticInit157f05f27a3285b4e529ec8dec75a307::getInitializer($loader)); 33 33 34 34 $loader->register(true); 35 35 36 $filesToLoad = \Composer\Autoload\ComposerStaticInit 98b78f29606e95d04bc35c9b41f7b376::$files;36 $filesToLoad = \Composer\Autoload\ComposerStaticInit157f05f27a3285b4e529ec8dec75a307::$files; 37 37 $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { 38 38 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { -
mobile-bankid-integration/trunk/vendor/composer/autoload_static.php
r3106088 r3178066 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 98b78f29606e95d04bc35c9b41f7b3767 class ComposerStaticInit157f05f27a3285b4e529ec8dec75a307 8 8 { 9 9 public static $files = array ( … … 48 48 'Psr\\Http\\Message\\' => 49 49 array ( 50 0 => __DIR__ . '/..' . '/psr/http- message/src',51 1 => __DIR__ . '/..' . '/psr/http- factory/src',50 0 => __DIR__ . '/..' . '/psr/http-factory/src', 51 1 => __DIR__ . '/..' . '/psr/http-message/src', 52 52 ), 53 53 'Psr\\Http\\Client\\' => … … 217 217 { 218 218 return \Closure::bind(function () use ($loader) { 219 $loader->prefixLengthsPsr4 = ComposerStaticInit 98b78f29606e95d04bc35c9b41f7b376::$prefixLengthsPsr4;220 $loader->prefixDirsPsr4 = ComposerStaticInit 98b78f29606e95d04bc35c9b41f7b376::$prefixDirsPsr4;221 $loader->classMap = ComposerStaticInit 98b78f29606e95d04bc35c9b41f7b376::$classMap;219 $loader->prefixLengthsPsr4 = ComposerStaticInit157f05f27a3285b4e529ec8dec75a307::$prefixLengthsPsr4; 220 $loader->prefixDirsPsr4 = ComposerStaticInit157f05f27a3285b4e529ec8dec75a307::$prefixDirsPsr4; 221 $loader->classMap = ComposerStaticInit157f05f27a3285b4e529ec8dec75a307::$classMap; 222 222 223 223 }, null, ClassLoader::class); -
mobile-bankid-integration/trunk/vendor/composer/installed.json
r3106088 r3178066 87 87 { 88 88 "name": "chillerlan/php-settings-container", 89 "version": "3.2. 0",90 "version_normalized": "3.2. 0.0",89 "version": "3.2.1", 90 "version_normalized": "3.2.1.0", 91 91 "source": { 92 92 "type": "git", 93 93 "url": "https://github.com/chillerlan/php-settings-container.git", 94 "reference": " 8f93648fac8e6bacac8e00a8d325eba4950295e6"95 }, 96 "dist": { 97 "type": "zip", 98 "url": "https://api.github.com/repos/chillerlan/php-settings-container/zipball/ 8f93648fac8e6bacac8e00a8d325eba4950295e6",99 "reference": " 8f93648fac8e6bacac8e00a8d325eba4950295e6",94 "reference": "95ed3e9676a1d47cab2e3174d19b43f5dbf52681" 95 }, 96 "dist": { 97 "type": "zip", 98 "url": "https://api.github.com/repos/chillerlan/php-settings-container/zipball/95ed3e9676a1d47cab2e3174d19b43f5dbf52681", 99 "reference": "95ed3e9676a1d47cab2e3174d19b43f5dbf52681", 100 100 "shasum": "" 101 101 }, … … 105 105 }, 106 106 "require-dev": { 107 "phan/phan": "^5.4",108 107 "phpmd/phpmd": "^2.15", 108 "phpstan/phpstan": "^1.11", 109 "phpstan/phpstan-deprecation-rules": "^1.2", 109 110 "phpunit/phpunit": "^10.5", 110 "squizlabs/php_codesniffer": "^3. 9"111 }, 112 "time": "2024-0 3-02T20:07:15+00:00",113 "type": "library", 114 "installation-source": "dist", 115 "autoload": { 116 "psr-4": { 117 "chillerlan\\Settings\\": "src /"111 "squizlabs/php_codesniffer": "^3.10" 112 }, 113 "time": "2024-07-16T11:13:48+00:00", 114 "type": "library", 115 "installation-source": "dist", 116 "autoload": { 117 "psr-4": { 118 "chillerlan\\Settings\\": "src" 118 119 } 119 120 }, … … 155 156 { 156 157 "name": "guzzlehttp/guzzle", 157 "version": "7. 8.1",158 "version_normalized": "7. 8.1.0",158 "version": "7.9.2", 159 "version_normalized": "7.9.2.0", 159 160 "source": { 160 161 "type": "git", 161 162 "url": "https://github.com/guzzle/guzzle.git", 162 "reference": " 41042bc7ab002487b876a0683fc8dce04ddce104"163 }, 164 "dist": { 165 "type": "zip", 166 "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ 41042bc7ab002487b876a0683fc8dce04ddce104",167 "reference": " 41042bc7ab002487b876a0683fc8dce04ddce104",163 "reference": "d281ed313b989f213357e3be1a179f02196ac99b" 164 }, 165 "dist": { 166 "type": "zip", 167 "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b", 168 "reference": "d281ed313b989f213357e3be1a179f02196ac99b", 168 169 "shasum": "" 169 170 }, 170 171 "require": { 171 172 "ext-json": "*", 172 "guzzlehttp/promises": "^1.5.3 || ^2.0. 1",173 "guzzlehttp/psr7": "^ 1.9.1 || ^2.5.1",173 "guzzlehttp/promises": "^1.5.3 || ^2.0.3", 174 "guzzlehttp/psr7": "^2.7.0", 174 175 "php": "^7.2.5 || ^8.0", 175 176 "psr/http-client": "^1.0", … … 182 183 "bamarni/composer-bin-plugin": "^1.8.2", 183 184 "ext-curl": "*", 184 " php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999",185 "guzzle/client-integration-tests": "3.0.2", 185 186 "php-http/message-factory": "^1.1", 186 "phpunit/phpunit": "^8.5.3 6 || ^9.6.15",187 "phpunit/phpunit": "^8.5.39 || ^9.6.20", 187 188 "psr/log": "^1.1 || ^2.0 || ^3.0" 188 189 }, … … 192 193 "psr/log": "Required for using the Log middleware" 193 194 }, 194 "time": "202 3-12-03T20:35:24+00:00",195 "time": "2024-07-24T11:22:20+00:00", 195 196 "type": "library", 196 197 "extra": { … … 264 265 "support": { 265 266 "issues": "https://github.com/guzzle/guzzle/issues", 266 "source": "https://github.com/guzzle/guzzle/tree/7. 8.1"267 "source": "https://github.com/guzzle/guzzle/tree/7.9.2" 267 268 }, 268 269 "funding": [ … … 284 285 { 285 286 "name": "guzzlehttp/promises", 286 "version": "2.0. 2",287 "version_normalized": "2.0. 2.0",287 "version": "2.0.4", 288 "version_normalized": "2.0.4.0", 288 289 "source": { 289 290 "type": "git", 290 291 "url": "https://github.com/guzzle/promises.git", 291 "reference": " bbff78d96034045e58e13dedd6ad91b5d1253223"292 }, 293 "dist": { 294 "type": "zip", 295 "url": "https://api.github.com/repos/guzzle/promises/zipball/ bbff78d96034045e58e13dedd6ad91b5d1253223",296 "reference": " bbff78d96034045e58e13dedd6ad91b5d1253223",292 "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455" 293 }, 294 "dist": { 295 "type": "zip", 296 "url": "https://api.github.com/repos/guzzle/promises/zipball/f9c436286ab2892c7db7be8c8da4ef61ccf7b455", 297 "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455", 297 298 "shasum": "" 298 299 }, … … 302 303 "require-dev": { 303 304 "bamarni/composer-bin-plugin": "^1.8.2", 304 "phpunit/phpunit": "^8.5.3 6 || ^9.6.15"305 }, 306 "time": "202 3-12-03T20:19:20+00:00",305 "phpunit/phpunit": "^8.5.39 || ^9.6.20" 306 }, 307 "time": "2024-10-17T10:06:22+00:00", 307 308 "type": "library", 308 309 "extra": { … … 350 351 "support": { 351 352 "issues": "https://github.com/guzzle/promises/issues", 352 "source": "https://github.com/guzzle/promises/tree/2.0. 2"353 "source": "https://github.com/guzzle/promises/tree/2.0.4" 353 354 }, 354 355 "funding": [ … … 370 371 { 371 372 "name": "guzzlehttp/psr7", 372 "version": "2. 6.2",373 "version_normalized": "2. 6.2.0",373 "version": "2.7.0", 374 "version_normalized": "2.7.0.0", 374 375 "source": { 375 376 "type": "git", 376 377 "url": "https://github.com/guzzle/psr7.git", 377 "reference": " 45b30f99ac27b5ca93cb4831afe16285f57b8221"378 }, 379 "dist": { 380 "type": "zip", 381 "url": "https://api.github.com/repos/guzzle/psr7/zipball/ 45b30f99ac27b5ca93cb4831afe16285f57b8221",382 "reference": " 45b30f99ac27b5ca93cb4831afe16285f57b8221",378 "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201" 379 }, 380 "dist": { 381 "type": "zip", 382 "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201", 383 "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201", 383 384 "shasum": "" 384 385 }, … … 395 396 "require-dev": { 396 397 "bamarni/composer-bin-plugin": "^1.8.2", 397 "http-interop/http-factory-tests": " ^0.9",398 "phpunit/phpunit": "^8.5.3 6 || ^9.6.15"398 "http-interop/http-factory-tests": "0.9.0", 399 "phpunit/phpunit": "^8.5.39 || ^9.6.20" 399 400 }, 400 401 "suggest": { 401 402 "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" 402 403 }, 403 "time": "202 3-12-03T20:05:35+00:00",404 "time": "2024-07-18T11:15:46+00:00", 404 405 "type": "library", 405 406 "extra": { … … 469 470 "support": { 470 471 "issues": "https://github.com/guzzle/psr7/issues", 471 "source": "https://github.com/guzzle/psr7/tree/2. 6.2"472 "source": "https://github.com/guzzle/psr7/tree/2.7.0" 472 473 }, 473 474 "funding": [ -
mobile-bankid-integration/trunk/vendor/composer/installed.php
r3106088 r3178066 4 4 'pretty_version' => 'dev-trunk', 5 5 'version' => 'dev-trunk', 6 'reference' => ' a98e6c5268e731eb827275e8a6cbab799015651d',6 'reference' => 'eda3de5ee6e36223b306861696b1d726d31576a6', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 14 14 'pretty_version' => 'dev-trunk', 15 15 'version' => 'dev-trunk', 16 'reference' => ' a98e6c5268e731eb827275e8a6cbab799015651d',16 'reference' => 'eda3de5ee6e36223b306861696b1d726d31576a6', 17 17 'type' => 'library', 18 18 'install_path' => __DIR__ . '/../../', … … 30 30 ), 31 31 'chillerlan/php-settings-container' => array( 32 'pretty_version' => '3.2. 0',33 'version' => '3.2. 0.0',34 'reference' => ' 8f93648fac8e6bacac8e00a8d325eba4950295e6',32 'pretty_version' => '3.2.1', 33 'version' => '3.2.1.0', 34 'reference' => '95ed3e9676a1d47cab2e3174d19b43f5dbf52681', 35 35 'type' => 'library', 36 36 'install_path' => __DIR__ . '/../chillerlan/php-settings-container', … … 39 39 ), 40 40 'guzzlehttp/guzzle' => array( 41 'pretty_version' => '7. 8.1',42 'version' => '7. 8.1.0',43 'reference' => ' 41042bc7ab002487b876a0683fc8dce04ddce104',41 'pretty_version' => '7.9.2', 42 'version' => '7.9.2.0', 43 'reference' => 'd281ed313b989f213357e3be1a179f02196ac99b', 44 44 'type' => 'library', 45 45 'install_path' => __DIR__ . '/../guzzlehttp/guzzle', … … 48 48 ), 49 49 'guzzlehttp/promises' => array( 50 'pretty_version' => '2.0. 2',51 'version' => '2.0. 2.0',52 'reference' => ' bbff78d96034045e58e13dedd6ad91b5d1253223',50 'pretty_version' => '2.0.4', 51 'version' => '2.0.4.0', 52 'reference' => 'f9c436286ab2892c7db7be8c8da4ef61ccf7b455', 53 53 'type' => 'library', 54 54 'install_path' => __DIR__ . '/../guzzlehttp/promises', … … 57 57 ), 58 58 'guzzlehttp/psr7' => array( 59 'pretty_version' => '2. 6.2',60 'version' => '2. 6.2.0',61 'reference' => ' 45b30f99ac27b5ca93cb4831afe16285f57b8221',59 'pretty_version' => '2.7.0', 60 'version' => '2.7.0.0', 61 'reference' => 'a70f5c95fb43bc83f07c9c948baa0dc1829bf201', 62 62 'type' => 'library', 63 63 'install_path' => __DIR__ . '/../guzzlehttp/psr7', -
mobile-bankid-integration/trunk/vendor/guzzlehttp/guzzle/CHANGELOG.md
r3070283 r3178066 2 2 3 3 Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version. 4 5 6 ## 7.9.2 - 2024-07-24 7 8 ### Fixed 9 10 - Adjusted handler selection to use cURL if its version is 7.21.2 or higher, rather than 7.34.0 11 12 13 ## 7.9.1 - 2024-07-19 14 15 ### Fixed 16 17 - Fix TLS 1.3 check for HTTP/2 requests 18 19 20 ## 7.9.0 - 2024-07-18 21 22 ### Changed 23 24 - Improve protocol version checks to provide feedback around unsupported protocols 25 - Only select the cURL handler by default if 7.34.0 or higher is linked 26 - Improved `CurlMultiHandler` to avoid busy wait if possible 27 - Dropped support for EOL `guzzlehttp/psr7` v1 28 - Improved URI user info redaction in errors 29 30 ## 7.8.2 - 2024-07-18 31 32 ### Added 33 34 - Support for PHP 8.4 4 35 5 36 -
mobile-bankid-integration/trunk/vendor/guzzlehttp/guzzle/README.md
r3070283 r3178066 63 63 | Version | Status | Packagist | Namespace | Repo | Docs | PSR-7 | PHP Version | 64 64 |---------|---------------------|---------------------|--------------|---------------------|---------------------|-------|--------------| 65 | 3.x | EOL | `guzzle/guzzle` | `Guzzle` | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No | >=5.3.3,<7.0 |66 | 4.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v4][guzzle-4-repo] | N/A | No | >=5.4,<7.0 |67 | 5.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No | >=5.4,<7.4 |68 | 6.x | Security fixes only| `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes | >=5.5,<8.0 |69 | 7.x | Latest | `guzzlehttp/guzzle` | `GuzzleHttp` | [v7][guzzle-7-repo] | [v7][guzzle-7-docs] | Yes | >=7.2.5,<8. 4|65 | 3.x | EOL (2016-10-31) | `guzzle/guzzle` | `Guzzle` | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No | >=5.3.3,<7.0 | 66 | 4.x | EOL (2016-10-31) | `guzzlehttp/guzzle` | `GuzzleHttp` | [v4][guzzle-4-repo] | N/A | No | >=5.4,<7.0 | 67 | 5.x | EOL (2019-10-31) | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No | >=5.4,<7.4 | 68 | 6.x | EOL (2023-10-31) | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes | >=5.5,<8.0 | 69 | 7.x | Latest | `guzzlehttp/guzzle` | `GuzzleHttp` | [v7][guzzle-7-repo] | [v7][guzzle-7-docs] | Yes | >=7.2.5,<8.5 | 70 70 71 71 [guzzle-3-repo]: https://github.com/guzzle/guzzle3 -
mobile-bankid-integration/trunk/vendor/guzzlehttp/guzzle/composer.json
r3070283 r3178066 51 51 } 52 52 ], 53 "repositories": [ 54 { 55 "type": "package", 56 "package": { 57 "name": "guzzle/client-integration-tests", 58 "version": "v3.0.2", 59 "dist": { 60 "url": "https://codeload.github.com/guzzle/client-integration-tests/zip/2c025848417c1135031fdf9c728ee53d0a7ceaee", 61 "type": "zip" 62 }, 63 "require": { 64 "php": "^7.2.5 || ^8.0", 65 "phpunit/phpunit": "^7.5.20 || ^8.5.8 || ^9.3.11", 66 "php-http/message": "^1.0 || ^2.0", 67 "guzzlehttp/psr7": "^1.7 || ^2.0", 68 "th3n3rd/cartesian-product": "^0.3" 69 }, 70 "autoload": { 71 "psr-4": { 72 "Http\\Client\\Tests\\": "src/" 73 } 74 }, 75 "bin": [ 76 "bin/http_test_server" 77 ] 78 } 79 } 80 ], 53 81 "require": { 54 82 "php": "^7.2.5 || ^8.0", 55 83 "ext-json": "*", 56 "guzzlehttp/promises": "^1.5.3 || ^2.0. 1",57 "guzzlehttp/psr7": "^ 1.9.1 || ^2.5.1",84 "guzzlehttp/promises": "^1.5.3 || ^2.0.3", 85 "guzzlehttp/psr7": "^2.7.0", 58 86 "psr/http-client": "^1.0", 59 87 "symfony/deprecation-contracts": "^2.2 || ^3.0" … … 65 93 "ext-curl": "*", 66 94 "bamarni/composer-bin-plugin": "^1.8.2", 67 " php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999",95 "guzzle/client-integration-tests": "3.0.2", 68 96 "php-http/message-factory": "^1.1", 69 "phpunit/phpunit": "^8.5.3 6 || ^9.6.15",97 "phpunit/phpunit": "^8.5.39 || ^9.6.20", 70 98 "psr/log": "^1.1 || ^2.0 || ^3.0" 71 99 }, -
mobile-bankid-integration/trunk/vendor/guzzlehttp/guzzle/src/BodySummarizer.php
r3070283 r3178066 12 12 private $truncateAt; 13 13 14 public function __construct( int $truncateAt = null)14 public function __construct(?int $truncateAt = null) 15 15 { 16 16 $this->truncateAt = $truncateAt; … … 23 23 { 24 24 return $this->truncateAt === null 25 ? \GuzzleHttp\Psr7\Message::bodySummary($message)26 : \GuzzleHttp\Psr7\Message::bodySummary($message, $this->truncateAt);25 ? Psr7\Message::bodySummary($message) 26 : Psr7\Message::bodySummary($message, $this->truncateAt); 27 27 } 28 28 } -
mobile-bankid-integration/trunk/vendor/guzzlehttp/guzzle/src/Client.php
r3070283 r3178066 53 53 * @param array $config Client configuration settings. 54 54 * 55 * @see \GuzzleHttp\RequestOptions for a list of available request options.55 * @see RequestOptions for a list of available request options. 56 56 */ 57 57 public function __construct(array $config = []) … … 203 203 * @deprecated Client::getConfig will be removed in guzzlehttp/guzzle:8.0. 204 204 */ 205 public function getConfig( string $option = null)205 public function getConfig(?string $option = null) 206 206 { 207 207 return $option === null -
mobile-bankid-integration/trunk/vendor/guzzlehttp/guzzle/src/ClientInterface.php
r3070283 r3178066 81 81 * @deprecated ClientInterface::getConfig will be removed in guzzlehttp/guzzle:8.0. 82 82 */ 83 public function getConfig( string $option = null);83 public function getConfig(?string $option = null); 84 84 } -
mobile-bankid-integration/trunk/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php
r3070283 r3178066 104 104 } 105 105 106 public function clear( string $domain = null, string $path = null,string $name = null): void106 public function clear(?string $domain = null, ?string $path = null, ?string $name = null): void 107 107 { 108 108 if (!$domain) { -
mobile-bankid-integration/trunk/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php
r3070283 r3178066 63 63 * @param string|null $name Clears cookies matching a domain, path, and name 64 64 */ 65 public function clear( string $domain = null, string $path = null,string $name = null): void;65 public function clear(?string $domain = null, ?string $path = null, ?string $name = null): void; 66 66 67 67 /** -
mobile-bankid-integration/trunk/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php
r3070283 r3178066 15 15 RequestInterface $request, 16 16 ResponseInterface $response, 17 \Throwable $previous = null,17 ?\Throwable $previous = null, 18 18 array $handlerContext = [] 19 19 ) { -
mobile-bankid-integration/trunk/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php
r3070283 r3178066 26 26 string $message, 27 27 RequestInterface $request, 28 \Throwable $previous = null,28 ?\Throwable $previous = null, 29 29 array $handlerContext = [] 30 30 ) { -
mobile-bankid-integration/trunk/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php
r3070283 r3178066 8 8 use Psr\Http\Message\RequestInterface; 9 9 use Psr\Http\Message\ResponseInterface; 10 use Psr\Http\Message\UriInterface;11 10 12 11 /** … … 33 32 string $message, 34 33 RequestInterface $request, 35 ResponseInterface $response = null,36 \Throwable $previous = null,34 ?ResponseInterface $response = null, 35 ?\Throwable $previous = null, 37 36 array $handlerContext = [] 38 37 ) { … … 64 63 public static function create( 65 64 RequestInterface $request, 66 ResponseInterface $response = null,67 \Throwable $previous = null,65 ?ResponseInterface $response = null, 66 ?\Throwable $previous = null, 68 67 array $handlerContext = [], 69 BodySummarizerInterface $bodySummarizer = null68 ?BodySummarizerInterface $bodySummarizer = null 70 69 ): self { 71 70 if (!$response) { … … 91 90 } 92 91 93 $uri = $request->getUri(); 94 $uri = static::obfuscateUri($uri); 92 $uri = \GuzzleHttp\Psr7\Utils::redactUserInfo($request->getUri()); 95 93 96 94 // Client Error: `GET /` resulted in a `404 Not Found` response: … … 112 110 113 111 return new $className($message, $request, $response, $previous, $handlerContext); 114 }115 116 /**117 * Obfuscates URI if there is a username and a password present118 */119 private static function obfuscateUri(UriInterface $uri): UriInterface120 {121 $userInfo = $uri->getUserInfo();122 123 if (false !== ($pos = \strpos($userInfo, ':'))) {124 return $uri->withUserInfo(\substr($userInfo, 0, $pos), '***');125 }126 127 return $uri;128 112 } 129 113 -
mobile-bankid-integration/trunk/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php
r3070283 r3178066 12 12 use GuzzleHttp\Utils; 13 13 use Psr\Http\Message\RequestInterface; 14 use Psr\Http\Message\UriInterface; 14 15 15 16 /** … … 47 48 public function create(RequestInterface $request, array $options): EasyHandle 48 49 { 50 $protocolVersion = $request->getProtocolVersion(); 51 52 if ('2' === $protocolVersion || '2.0' === $protocolVersion) { 53 if (!self::supportsHttp2()) { 54 throw new ConnectException('HTTP/2 is supported by the cURL handler, however libcurl is built without HTTP/2 support.', $request); 55 } 56 } elseif ('1.0' !== $protocolVersion && '1.1' !== $protocolVersion) { 57 throw new ConnectException(sprintf('HTTP/%s is not supported by the cURL handler.', $protocolVersion), $request); 58 } 59 49 60 if (isset($options['curl']['body_as_string'])) { 50 61 $options['_body_as_string'] = $options['curl']['body_as_string']; … … 71 82 72 83 return $easy; 84 } 85 86 private static function supportsHttp2(): bool 87 { 88 static $supportsHttp2 = null; 89 90 if (null === $supportsHttp2) { 91 $supportsHttp2 = self::supportsTls12() 92 && defined('CURL_VERSION_HTTP2') 93 && (\CURL_VERSION_HTTP2 & \curl_version()['features']); 94 } 95 96 return $supportsHttp2; 97 } 98 99 private static function supportsTls12(): bool 100 { 101 static $supportsTls12 = null; 102 103 if (null === $supportsTls12) { 104 $supportsTls12 = \CURL_SSLVERSION_TLSv1_2 & \curl_version()['features']; 105 } 106 107 return $supportsTls12; 108 } 109 110 private static function supportsTls13(): bool 111 { 112 static $supportsTls13 = null; 113 114 if (null === $supportsTls13) { 115 $supportsTls13 = defined('CURL_SSLVERSION_TLSv1_3') 116 && (\CURL_SSLVERSION_TLSv1_3 & \curl_version()['features']); 117 } 118 119 return $supportsTls13; 73 120 } 74 121 … … 148 195 'appconnect_time' => \curl_getinfo($easy->handle, \CURLINFO_APPCONNECT_TIME), 149 196 ] + \curl_getinfo($easy->handle); 150 $ctx[self::CURL_VERSION_STR] = \curl_version()['version'];197 $ctx[self::CURL_VERSION_STR] = self::getCurlVersion(); 151 198 $factory->release($easy); 152 199 … … 157 204 158 205 return self::createRejection($easy, $ctx); 206 } 207 208 private static function getCurlVersion(): string 209 { 210 static $curlVersion = null; 211 212 if (null === $curlVersion) { 213 $curlVersion = \curl_version()['version']; 214 } 215 216 return $curlVersion; 159 217 } 160 218 … … 195 253 } 196 254 255 $uri = $easy->request->getUri(); 256 257 $sanitizedError = self::sanitizeCurlError($ctx['error'] ?? '', $uri); 258 197 259 $message = \sprintf( 198 260 'cURL error %s: %s (%s)', 199 261 $ctx['errno'], 200 $ ctx['error'],262 $sanitizedError, 201 263 'see https://curl.haxx.se/libcurl/c/libcurl-errors.html' 202 264 ); 203 $uriString = (string) $easy->request->getUri(); 204 if ($uriString !== '' && false === \strpos($ctx['error'], $uriString)) { 205 $message .= \sprintf(' for %s', $uriString); 265 266 if ('' !== $sanitizedError) { 267 $redactedUriString = \GuzzleHttp\Psr7\Utils::redactUserInfo($uri)->__toString(); 268 if ($redactedUriString !== '' && false === \strpos($sanitizedError, $redactedUriString)) { 269 $message .= \sprintf(' for %s', $redactedUriString); 270 } 206 271 } 207 272 … … 212 277 213 278 return P\Create::rejectionFor($error); 279 } 280 281 private static function sanitizeCurlError(string $error, UriInterface $uri): string 282 { 283 if ('' === $error) { 284 return $error; 285 } 286 287 $baseUri = $uri->withQuery('')->withFragment(''); 288 $baseUriString = $baseUri->__toString(); 289 290 if ('' === $baseUriString) { 291 return $error; 292 } 293 294 $redactedUriString = \GuzzleHttp\Psr7\Utils::redactUserInfo($baseUri)->__toString(); 295 296 return str_replace($baseUriString, $redactedUriString, $error); 214 297 } 215 298 … … 233 316 234 317 $version = $easy->request->getProtocolVersion(); 235 if ($version == 1.1) { 318 319 if ('2' === $version || '2.0' === $version) { 320 $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_2_0; 321 } elseif ('1.1' === $version) { 236 322 $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_1; 237 } elseif ($version == 2.0) {238 $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_2_0;239 323 } else { 240 324 $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_0; … … 391 475 // sets a matching 'Accept-Encoding' header. 392 476 $conf[\CURLOPT_ENCODING] = ''; 393 // But as the user did not specify any acceptable encodings we need 394 // to overwrite this implicit header with an empty one. 477 // But as the user did not specify any encoding preference, 478 // let's leave it up to server by preventing curl from sending 479 // the header, which will be interpreted as 'Accept-Encoding: *'. 480 // https://www.rfc-editor.org/rfc/rfc9110#field.accept-encoding 395 481 $conf[\CURLOPT_HTTPHEADER][] = 'Accept-Encoding:'; 396 482 } … … 456 542 457 543 if (isset($options['crypto_method'])) { 458 if (\STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT === $options['crypto_method']) { 459 if (!defined('CURL_SSLVERSION_TLSv1_0')) { 460 throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.0 not supported by your version of cURL'); 461 } 544 $protocolVersion = $easy->request->getProtocolVersion(); 545 546 // If HTTP/2, upgrade TLS 1.0 and 1.1 to 1.2 547 if ('2' === $protocolVersion || '2.0' === $protocolVersion) { 548 if ( 549 \STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT === $options['crypto_method'] 550 || \STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT === $options['crypto_method'] 551 || \STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT === $options['crypto_method'] 552 ) { 553 $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_2; 554 } elseif (defined('STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT') && \STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT === $options['crypto_method']) { 555 if (!self::supportsTls13()) { 556 throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.3 not supported by your version of cURL'); 557 } 558 $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_3; 559 } else { 560 throw new \InvalidArgumentException('Invalid crypto_method request option: unknown version provided'); 561 } 562 } elseif (\STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT === $options['crypto_method']) { 462 563 $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_0; 463 564 } elseif (\STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT === $options['crypto_method']) { 464 if (!defined('CURL_SSLVERSION_TLSv1_1')) {465 throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.1 not supported by your version of cURL');466 }467 565 $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_1; 468 566 } elseif (\STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT === $options['crypto_method']) { 469 if (! defined('CURL_SSLVERSION_TLSv1_2')) {567 if (!self::supportsTls12()) { 470 568 throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.2 not supported by your version of cURL'); 471 569 } 472 570 $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_2; 473 571 } elseif (defined('STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT') && \STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT === $options['crypto_method']) { 474 if (! defined('CURL_SSLVERSION_TLSv1_3')) {572 if (!self::supportsTls13()) { 475 573 throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.3 not supported by your version of cURL'); 476 574 } -
mobile-bankid-integration/trunk/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php
r3070283 r3178066 3 3 namespace GuzzleHttp\Handler; 4 4 5 use Closure; 5 6 use GuzzleHttp\Promise as P; 6 7 use GuzzleHttp\Promise\Promise; … … 160 161 } 161 162 163 // Run curl_multi_exec in the queue to enable other async tasks to run 164 P\Utils::queue()->add(Closure::fromCallable([$this, 'tickInQueue'])); 165 162 166 // Step through the task queue which may add additional requests. 163 167 P\Utils::queue()->run(); … … 170 174 171 175 while (\curl_multi_exec($this->_mh, $this->active) === \CURLM_CALL_MULTI_PERFORM) { 176 // Prevent busy looping for slow HTTP requests. 177 \curl_multi_select($this->_mh, $this->selectTimeout); 172 178 } 173 179 174 180 $this->processMessages(); 181 } 182 183 /** 184 * Runs \curl_multi_exec() inside the event loop, to prevent busy looping 185 */ 186 private function tickInQueue(): void 187 { 188 if (\curl_multi_exec($this->_mh, $this->active) === \CURLM_CALL_MULTI_PERFORM) { 189 \curl_multi_select($this->_mh, 0); 190 P\Utils::queue()->add(Closure::fromCallable([$this, 'tickInQueue'])); 191 } 175 192 } 176 193 -
mobile-bankid-integration/trunk/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php
r3070283 r3178066 53 53 * @param callable|null $onRejected Callback to invoke when the return value is rejected. 54 54 */ 55 public static function createWithMiddleware( array $queue = null, callable $onFulfilled = null,callable $onRejected = null): HandlerStack55 public static function createWithMiddleware(?array $queue = null, ?callable $onFulfilled = null, ?callable $onRejected = null): HandlerStack 56 56 { 57 57 return HandlerStack::create(new self($queue, $onFulfilled, $onRejected)); … … 60 60 /** 61 61 * The passed in value must be an array of 62 * {@see \Psr\Http\Message\ResponseInterface} objects, Exceptions,62 * {@see ResponseInterface} objects, Exceptions, 63 63 * callables, or Promises. 64 64 * … … 67 67 * @param callable|null $onRejected Callback to invoke when the return value is rejected. 68 68 */ 69 public function __construct( array $queue = null, callable $onFulfilled = null,callable $onRejected = null)69 public function __construct(?array $queue = null, ?callable $onFulfilled = null, ?callable $onRejected = null) 70 70 { 71 71 $this->onFulfilled = $onFulfilled; … … 201 201 RequestInterface $request, 202 202 array $options, 203 ResponseInterface $response = null,203 ?ResponseInterface $response = null, 204 204 $reason = null 205 205 ): void { -
mobile-bankid-integration/trunk/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php
r3070283 r3178066 39 39 if (isset($options['delay'])) { 40 40 \usleep($options['delay'] * 1000); 41 } 42 43 $protocolVersion = $request->getProtocolVersion(); 44 45 if ('1.0' !== $protocolVersion && '1.1' !== $protocolVersion) { 46 throw new ConnectException(sprintf('HTTP/%s is not supported by the stream handler.', $protocolVersion), $request); 41 47 } 42 48 … … 84 90 RequestInterface $request, 85 91 ?float $startTime, 86 ResponseInterface $response = null,87 \Throwable $error = null92 ?ResponseInterface $response = null, 93 ?\Throwable $error = null 88 94 ): void { 89 95 if (isset($options['on_stats'])) { … … 274 280 // HTTP/1.1 streams using the PHP stream wrapper require a 275 281 // Connection: close header 276 if ($request->getProtocolVersion() == '1.1'282 if ($request->getProtocolVersion() === '1.1' 277 283 && !$request->hasHeader('Connection') 278 284 ) { -
mobile-bankid-integration/trunk/vendor/guzzlehttp/guzzle/src/HandlerStack.php
r3070283 r3178066 45 45 * system will be utilized. 46 46 */ 47 public static function create( callable $handler = null): self47 public static function create(?callable $handler = null): self 48 48 { 49 49 $stack = new self($handler ?: Utils::chooseHandler()); … … 59 59 * @param (callable(RequestInterface, array): PromiseInterface)|null $handler Underlying HTTP handler. 60 60 */ 61 public function __construct( callable $handler = null)61 public function __construct(?callable $handler = null) 62 62 { 63 63 $this->handler = $handler; … … 132 132 * @param string $name Name to register for this middleware. 133 133 */ 134 public function unshift(callable $middleware, string $name = null): void134 public function unshift(callable $middleware, ?string $name = null): void 135 135 { 136 136 \array_unshift($this->stack, [$middleware, $name]); -
mobile-bankid-integration/trunk/vendor/guzzlehttp/guzzle/src/MessageFormatter.php
r3070283 r3178066 69 69 * @param \Throwable|null $error Exception that was received 70 70 */ 71 public function format(RequestInterface $request, ResponseInterface $response = null,\Throwable $error = null): string71 public function format(RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $error = null): string 72 72 { 73 73 $cache = []; -
mobile-bankid-integration/trunk/vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php
r3070283 r3178066 15 15 * @param \Throwable|null $error Exception that was received 16 16 */ 17 public function format(RequestInterface $request, ResponseInterface $response = null,\Throwable $error = null): string;17 public function format(RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $error = null): string; 18 18 } -
mobile-bankid-integration/trunk/vendor/guzzlehttp/guzzle/src/Middleware.php
r3070283 r3178066 56 56 * @return callable(callable): callable Returns a function that accepts the next handler. 57 57 */ 58 public static function httpErrors( BodySummarizerInterface $bodySummarizer = null): callable58 public static function httpErrors(?BodySummarizerInterface $bodySummarizer = null): callable 59 59 { 60 60 return static function (callable $handler) use ($bodySummarizer): callable { … … 133 133 * @return callable Returns a function that accepts the next handler. 134 134 */ 135 public static function tap( callable $before = null,callable $after = null): callable135 public static function tap(?callable $before = null, ?callable $after = null): callable 136 136 { 137 137 return static function (callable $handler) use ($before, $after): callable { … … 177 177 * @return callable Returns a function that accepts the next handler. 178 178 */ 179 public static function retry(callable $decider, callable $delay = null): callable179 public static function retry(callable $decider, ?callable $delay = null): callable 180 180 { 181 181 return static function (callable $handler) use ($decider, $delay): RetryMiddleware { -
mobile-bankid-integration/trunk/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php
r3070283 r3178066 77 77 $expect = $options['expect'] ?? null; 78 78 79 // Return if disabled or if you're not using HTTP/1.1 or HTTP/2.080 if ($expect === false || $request->getProtocolVersion() < 1.1) {79 // Return if disabled or using HTTP/1.0 80 if ($expect === false || $request->getProtocolVersion() === '1.0') { 81 81 return; 82 82 } -
mobile-bankid-integration/trunk/vendor/guzzlehttp/guzzle/src/RequestOptions.php
r3070283 r3178066 62 62 * jar to use or what cookies to send. This option only works if your 63 63 * handler has the `cookie` middleware. Valid values are `false` and 64 * an instance of {@see \GuzzleHttp\Cookie\CookieJarInterface}.64 * an instance of {@see Cookie\CookieJarInterface}. 65 65 */ 66 66 public const COOKIES = 'cookies'; -
mobile-bankid-integration/trunk/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php
r3070283 r3178066 41 41 * milliseconds to delay. 42 42 */ 43 public function __construct(callable $decider, callable $nextHandler, callable $delay = null)43 public function __construct(callable $decider, callable $nextHandler, ?callable $delay = null) 44 44 { 45 45 $this->decider = $decider; … … 111 111 } 112 112 113 private function doRetry(RequestInterface $request, array $options, ResponseInterface $response = null): PromiseInterface113 private function doRetry(RequestInterface $request, array $options, ?ResponseInterface $response = null): PromiseInterface 114 114 { 115 115 $options['delay'] = ($this->delay)(++$options['retries'], $response, $request); -
mobile-bankid-integration/trunk/vendor/guzzlehttp/guzzle/src/TransferStats.php
r3070283 r3178066 47 47 public function __construct( 48 48 RequestInterface $request, 49 ResponseInterface $response = null,50 float $transferTime = null,49 ?ResponseInterface $response = null, 50 ?float $transferTime = null, 51 51 $handlerErrorData = null, 52 52 array $handlerStats = [] -
mobile-bankid-integration/trunk/vendor/guzzlehttp/guzzle/src/Utils.php
r3070283 r3178066 72 72 } 73 73 74 return \GuzzleHttp\Psr7\Utils::tryFopen('php://output', 'w');74 return Psr7\Utils::tryFopen('php://output', 'w'); 75 75 } 76 76 … … 88 88 $handler = null; 89 89 90 if (\defined('CURLOPT_CUSTOMREQUEST') ) {90 if (\defined('CURLOPT_CUSTOMREQUEST') && \function_exists('curl_version') && version_compare(curl_version()['version'], '7.21.2') >= 0) { 91 91 if (\function_exists('curl_multi_exec') && \function_exists('curl_exec')) { 92 92 $handler = Proxy::wrapSync(new CurlMultiHandler(), new CurlHandler()); -
mobile-bankid-integration/trunk/vendor/guzzlehttp/promises/CHANGELOG.md
r3070283 r3178066 1 1 # CHANGELOG 2 3 4 ## 2.0.4 - 2024-10-17 5 6 ### Fixed 7 8 - Once settled, don't allow further rejection of additional promises 9 10 11 ## 2.0.3 - 2024-07-18 12 13 ### Changed 14 15 - PHP 8.4 support 2 16 3 17 -
mobile-bankid-integration/trunk/vendor/guzzlehttp/promises/README.md
r3070283 r3178066 39 39 ## Version Guidance 40 40 41 | Version | Status | PHP Version |42 |---------|--------------------- ---|--------------|43 | 1.x | Bug and security fixes| >=5.5,<8.3 |44 | 2.x | Latest | >=7.2.5,<8.4|41 | Version | Status | PHP Version | 42 |---------|---------------------|--------------| 43 | 1.x | Security fixes only | >=5.5,<8.3 | 44 | 2.x | Latest | >=7.2.5,<8.5 | 45 45 46 46 -
mobile-bankid-integration/trunk/vendor/guzzlehttp/promises/composer.json
r3070283 r3178066 31 31 "require-dev": { 32 32 "bamarni/composer-bin-plugin": "^1.8.2", 33 "phpunit/phpunit": "^8.5.3 6 || ^9.6.15"33 "phpunit/phpunit": "^8.5.39 || ^9.6.20" 34 34 }, 35 35 "autoload": { -
mobile-bankid-integration/trunk/vendor/guzzlehttp/promises/src/Coroutine.php
r3070283 r3178066 85 85 86 86 public function then( 87 callable $onFulfilled = null,88 callable $onRejected = null87 ?callable $onFulfilled = null, 88 ?callable $onRejected = null 89 89 ): PromiseInterface { 90 90 return $this->result->then($onFulfilled, $onRejected); -
mobile-bankid-integration/trunk/vendor/guzzlehttp/promises/src/Each.php
r3070283 r3178066 24 24 public static function of( 25 25 $iterable, 26 callable $onFulfilled = null,27 callable $onRejected = null26 ?callable $onFulfilled = null, 27 ?callable $onRejected = null 28 28 ): PromiseInterface { 29 29 return (new EachPromise($iterable, [ … … 47 47 $iterable, 48 48 $concurrency, 49 callable $onFulfilled = null,50 callable $onRejected = null49 ?callable $onFulfilled = null, 50 ?callable $onRejected = null 51 51 ): PromiseInterface { 52 52 return (new EachPromise($iterable, [ … … 68 68 $iterable, 69 69 $concurrency, 70 callable $onFulfilled = null70 ?callable $onFulfilled = null 71 71 ): PromiseInterface { 72 72 return self::ofLimit( -
mobile-bankid-integration/trunk/vendor/guzzlehttp/promises/src/FulfilledPromise.php
r3070283 r3178066 32 32 33 33 public function then( 34 callable $onFulfilled = null,35 callable $onRejected = null34 ?callable $onFulfilled = null, 35 ?callable $onRejected = null 36 36 ): PromiseInterface { 37 37 // Return itself if there is no onFulfilled function. -
mobile-bankid-integration/trunk/vendor/guzzlehttp/promises/src/Promise.php
r3070283 r3178066 26 26 */ 27 27 public function __construct( 28 callable $waitFn = null,29 callable $cancelFn = null28 ?callable $waitFn = null, 29 ?callable $cancelFn = null 30 30 ) { 31 31 $this->waitFn = $waitFn; … … 34 34 35 35 public function then( 36 callable $onFulfilled = null,37 callable $onRejected = null36 ?callable $onFulfilled = null, 37 ?callable $onRejected = null 38 38 ): PromiseInterface { 39 39 if ($this->state === self::PENDING) { -
mobile-bankid-integration/trunk/vendor/guzzlehttp/promises/src/PromiseInterface.php
r3070283 r3178066 28 28 */ 29 29 public function then( 30 callable $onFulfilled = null,31 callable $onRejected = null30 ?callable $onFulfilled = null, 31 ?callable $onRejected = null 32 32 ): PromiseInterface; 33 33 -
mobile-bankid-integration/trunk/vendor/guzzlehttp/promises/src/RejectedPromise.php
r3070283 r3178066 32 32 33 33 public function then( 34 callable $onFulfilled = null,35 callable $onRejected = null34 ?callable $onFulfilled = null, 35 ?callable $onRejected = null 36 36 ): PromiseInterface { 37 37 // If there's no onRejected callback then just return self. -
mobile-bankid-integration/trunk/vendor/guzzlehttp/promises/src/RejectionException.php
r3070283 r3178066 19 19 * @param string|null $description Optional description. 20 20 */ 21 public function __construct($reason, string $description = null)21 public function __construct($reason, ?string $description = null) 22 22 { 23 23 $this->reason = $reason; -
mobile-bankid-integration/trunk/vendor/guzzlehttp/promises/src/Utils.php
r3070283 r3178066 22 22 * @param TaskQueueInterface|null $assign Optionally specify a new queue instance. 23 23 */ 24 public static function queue( TaskQueueInterface $assign = null): TaskQueueInterface24 public static function queue(?TaskQueueInterface $assign = null): TaskQueueInterface 25 25 { 26 26 static $queue; … … 145 145 }, 146 146 function ($reason, $idx, Promise $aggregate): void { 147 $aggregate->reject($reason); 147 if (Is::pending($aggregate)) { 148 $aggregate->reject($reason); 149 } 148 150 } 149 151 )->then(function () use (&$results) { -
mobile-bankid-integration/trunk/vendor/guzzlehttp/psr7/CHANGELOG.md
r3070283 r3178066 5 5 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) 6 6 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 8 ## 2.7.0 - 2024-07-18 9 10 ### Added 11 12 - Add `Utils::redactUserInfo()` method 13 - Add ability to encode bools as ints in `Query::build` 14 15 ## 2.6.3 - 2024-07-18 16 17 ### Fixed 18 19 - Make `StreamWrapper::stream_stat()` return `false` if inner stream's size is `null` 20 21 ### Changed 22 23 - PHP 8.4 support 7 24 8 25 ## 2.6.2 - 2023-12-03 -
mobile-bankid-integration/trunk/vendor/guzzlehttp/psr7/README.md
r3070283 r3178066 25 25 | Version | Status | PHP Version | 26 26 |---------|---------------------|--------------| 27 | 1.x | Security fixes only | >=5.4,<8.1|28 | 2.x | Latest | >=7.2.5,<8. 4|27 | 1.x | EOL (2024-06-30) | >=5.4,<8.2 | 28 | 2.x | Latest | >=7.2.5,<8.5 | 29 29 30 30 … … 437 437 ## `GuzzleHttp\Psr7\Query::build` 438 438 439 `public static function build(array $params, int|false $encoding = PHP_QUERY_RFC3986 ): string`439 `public static function build(array $params, int|false $encoding = PHP_QUERY_RFC3986, bool $treatBoolsAsInts = true): string` 440 440 441 441 Build a query string from an array of key value pairs. … … 499 499 ## `GuzzleHttp\Psr7\Utils::readLine` 500 500 501 `public static function readLine(StreamInterface $stream, int $maxLength = null): string`501 `public static function readLine(StreamInterface $stream, ?int $maxLength = null): string` 502 502 503 503 Read a line from the stream up to the maximum allowed buffer length. 504 505 506 ## `GuzzleHttp\Psr7\Utils::redactUserInfo` 507 508 `public static function redactUserInfo(UriInterface $uri): UriInterface` 509 510 Redact the password in the user info part of a URI. 504 511 505 512 … … 675 682 ### `GuzzleHttp\Psr7\Uri::isSameDocumentReference` 676 683 677 `public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null): bool`684 `public static function isSameDocumentReference(UriInterface $uri, ?UriInterface $base = null): bool` 678 685 679 686 Whether the URI is a same-document reference. A same-document reference refers to a URI that is, aside from its -
mobile-bankid-integration/trunk/vendor/guzzlehttp/psr7/composer.json
r3070283 r3178066 62 62 "require-dev": { 63 63 "bamarni/composer-bin-plugin": "^1.8.2", 64 "http-interop/http-factory-tests": " ^0.9",65 "phpunit/phpunit": "^8.5.3 6 || ^9.6.15"64 "http-interop/http-factory-tests": "0.9.0", 65 "phpunit/phpunit": "^8.5.39 || ^9.6.20" 66 66 }, 67 67 "suggest": { -
mobile-bankid-integration/trunk/vendor/guzzlehttp/psr7/src/CachingStream.php
r3070283 r3178066 34 34 public function __construct( 35 35 StreamInterface $stream, 36 StreamInterface $target = null36 ?StreamInterface $target = null 37 37 ) { 38 38 $this->remoteStream = $stream; -
mobile-bankid-integration/trunk/vendor/guzzlehttp/psr7/src/HttpFactory.php
r3070283 r3178066 28 28 public function createUploadedFile( 29 29 StreamInterface $stream, 30 int $size = null,30 ?int $size = null, 31 31 int $error = \UPLOAD_ERR_OK, 32 string $clientFilename = null,33 string $clientMediaType = null32 ?string $clientFilename = null, 33 ?string $clientMediaType = null 34 34 ): UploadedFileInterface { 35 35 if ($size === null) { -
mobile-bankid-integration/trunk/vendor/guzzlehttp/psr7/src/MultipartStream.php
r3070283 r3178066 33 33 * @throws \InvalidArgumentException 34 34 */ 35 public function __construct(array $elements = [], string $boundary = null)35 public function __construct(array $elements = [], ?string $boundary = null) 36 36 { 37 37 $this->boundary = $boundary ?: bin2hex(random_bytes(20)); -
mobile-bankid-integration/trunk/vendor/guzzlehttp/psr7/src/Query.php
r3070283 r3178066 64 64 * encountered (like `http_build_query()` would). 65 65 * 66 * @param array $params Query string parameters. 67 * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986 68 * to encode using RFC3986, or PHP_QUERY_RFC1738 69 * to encode using RFC1738. 66 * @param array $params Query string parameters. 67 * @param int|false $encoding Set to false to not encode, 68 * PHP_QUERY_RFC3986 to encode using 69 * RFC3986, or PHP_QUERY_RFC1738 to 70 * encode using RFC1738. 71 * @param bool $treatBoolsAsInts Set to true to encode as 0/1, and 72 * false as false/true. 70 73 */ 71 public static function build(array $params, $encoding = PHP_QUERY_RFC3986 ): string74 public static function build(array $params, $encoding = PHP_QUERY_RFC3986, bool $treatBoolsAsInts = true): string 72 75 { 73 76 if (!$params) { … … 87 90 } 88 91 92 $castBool = $treatBoolsAsInts ? static function ($v) { return (int) $v; } : static function ($v) { return $v ? 'true' : 'false'; }; 93 89 94 $qs = ''; 90 95 foreach ($params as $k => $v) { … … 92 97 if (!is_array($v)) { 93 98 $qs .= $k; 94 $v = is_bool($v) ? (int) $v: $v;99 $v = is_bool($v) ? $castBool($v) : $v; 95 100 if ($v !== null) { 96 101 $qs .= '='.$encoder((string) $v); … … 100 105 foreach ($v as $vv) { 101 106 $qs .= $k; 102 $vv = is_bool($vv) ? (int) $vv: $vv;107 $vv = is_bool($vv) ? $castBool($vv) : $vv; 103 108 if ($vv !== null) { 104 109 $qs .= '='.$encoder((string) $vv); -
mobile-bankid-integration/trunk/vendor/guzzlehttp/psr7/src/Response.php
r3070283 r3178066 97 97 $body = null, 98 98 string $version = '1.1', 99 string $reason = null99 ?string $reason = null 100 100 ) { 101 101 $this->assertStatusCodeRange($status); -
mobile-bankid-integration/trunk/vendor/guzzlehttp/psr7/src/StreamWrapper.php
r3070283 r3178066 70 70 } 71 71 72 public function stream_open(string $path, string $mode, int $options, string &$opened_path = null): bool72 public function stream_open(string $path, string $mode, int $options, ?string &$opened_path = null): bool 73 73 { 74 74 $options = stream_context_get_options($this->context); … … 120 120 121 121 return $resource ?? false; 122 } 123 124 /** 125 * @return array{ 126 * dev: int, 127 * ino: int, 128 * mode: int, 129 * nlink: int, 130 * uid: int, 131 * gid: int, 132 * rdev: int, 133 * size: int, 134 * atime: int, 135 * mtime: int, 136 * ctime: int, 137 * blksize: int, 138 * blocks: int 139 * }|false 140 */ 141 public function stream_stat() 142 { 143 if ($this->stream->getSize() === null) { 144 return false; 145 } 146 147 static $modeMap = [ 148 'r' => 33060, 149 'rb' => 33060, 150 'r+' => 33206, 151 'w' => 33188, 152 'wb' => 33188, 153 ]; 154 155 return [ 156 'dev' => 0, 157 'ino' => 0, 158 'mode' => $modeMap[$this->mode], 159 'nlink' => 0, 160 'uid' => 0, 161 'gid' => 0, 162 'rdev' => 0, 163 'size' => $this->stream->getSize() ?: 0, 164 'atime' => 0, 165 'mtime' => 0, 166 'ctime' => 0, 167 'blksize' => 0, 168 'blocks' => 0, 169 ]; 122 170 } 123 171 … … 139 187 * } 140 188 */ 141 public function stream_stat(): array142 {143 static $modeMap = [144 'r' => 33060,145 'rb' => 33060,146 'r+' => 33206,147 'w' => 33188,148 'wb' => 33188,149 ];150 151 return [152 'dev' => 0,153 'ino' => 0,154 'mode' => $modeMap[$this->mode],155 'nlink' => 0,156 'uid' => 0,157 'gid' => 0,158 'rdev' => 0,159 'size' => $this->stream->getSize() ?: 0,160 'atime' => 0,161 'mtime' => 0,162 'ctime' => 0,163 'blksize' => 0,164 'blocks' => 0,165 ];166 }167 168 /**169 * @return array{170 * dev: int,171 * ino: int,172 * mode: int,173 * nlink: int,174 * uid: int,175 * gid: int,176 * rdev: int,177 * size: int,178 * atime: int,179 * mtime: int,180 * ctime: int,181 * blksize: int,182 * blocks: int183 * }184 */185 189 public function url_stat(string $path, int $flags): array 186 190 { -
mobile-bankid-integration/trunk/vendor/guzzlehttp/psr7/src/UploadedFile.php
r3070283 r3178066 65 65 ?int $size, 66 66 int $errorStatus, 67 string $clientFilename = null,68 string $clientMediaType = null67 ?string $clientFilename = null, 68 ?string $clientMediaType = null 69 69 ) { 70 70 $this->setError($errorStatus); -
mobile-bankid-integration/trunk/vendor/guzzlehttp/psr7/src/Uri.php
r3070283 r3178066 280 280 * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.4 281 281 */ 282 public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null): bool282 public static function isSameDocumentReference(UriInterface $uri, ?UriInterface $base = null): bool 283 283 { 284 284 if ($base !== null) { -
mobile-bankid-integration/trunk/vendor/guzzlehttp/psr7/src/Utils.php
r3070283 r3178066 232 232 * @param int|null $maxLength Maximum buffer length 233 233 */ 234 public static function readLine(StreamInterface $stream, int $maxLength = null): string234 public static function readLine(StreamInterface $stream, ?int $maxLength = null): string 235 235 { 236 236 $buffer = ''; … … 249 249 250 250 return $buffer; 251 } 252 253 /** 254 * Redact the password in the user info part of a URI. 255 */ 256 public static function redactUserInfo(UriInterface $uri): UriInterface 257 { 258 $userInfo = $uri->getUserInfo(); 259 260 if (false !== ($pos = \strpos($userInfo, ':'))) { 261 return $uri->withUserInfo(\substr($userInfo, 0, $pos), '***'); 262 } 263 264 return $uri; 251 265 } 252 266
Note: See TracChangeset
for help on using the changeset viewer.