import org.shredzone.acme4j.exception.AcmeConflictException; //導入依賴的package包/類private Registration loadOrRegisterAccount(Session session) throws AcmeException {Registration reg;try {messages.add("registering new user", LOG);reg = new RegistrationBuilder().create(session);URI agreement = reg.getAgreement();messages.add("accepting terms of service", LOG);EditableRegistration editableReg = reg.modify();editableReg.setAgreement(agreement);editableReg.addContact("mailto:" + config.getProperty("server.login"));editableReg.commit();} catch (AcmeConflictException ex) {messages.add("account already exists. use it", LOG);reg = Registration.bind(session, ex.getLocation());}return reg;}
import org.shredzone.acme4j.exception.AcmeConflictException; //導入依賴的package包/類/** * Finds your {@link Registration} at the ACME server. It will be found by your user's * public key. If your key is not known to the server yet, a new registration will be * created. * <p> * This is a simple way of finding your {@link Registration}. A better way is to get * the URI of your new registration with {@link Registration#getLocation()} and store * it somewhere. If you need to get access to your account later, reconnect to it via * {@link Registration#bind(Session, URI)} by using the stored location. * * @param session * {@link Session} to bind with * @return {@link Registration} connected to your account */private Registration findOrRegisterAccount(Session session, String contact) throws AcmeException { Registration reg; try { // Try to create a new Registration. reg = new RegistrationBuilder().addContact("mailto:" + contact).create(session); log.info("Registered a new user, URI: " + reg.getLocation()); // This is a new account. Let the user accept the Terms of Service. // We won't be able to authorize domains until the ToS is accepted. URI agreement = reg.getAgreement(); reg.modify().setAgreement(agreement).commit(); } catch (AcmeConflictException ex) { // The Key Pair is already registered. getLocation() contains the // URL of the existing registration's location. Bind it to the session. reg = Registration.bind(session, ex.getLocation()); log.info("Account does already exist, URI: " + reg.getLocation()); log.debug(ex); } return reg;}
import org.shredzone.acme4j.exception.AcmeConflictException; //導入依賴的package包/類public RegistrationManager(Session session) throws AcmeException { this.session = session; try { this.registration = new RegistrationBuilder().create(session); } catch (AcmeConflictException ex) { this.registration = Registration.bind(session, ex.getLocation()); LOG.info("You already have an account. Account reestablished."); }}
本文由 貴州做網站公司 整理發布,部分圖文來源于互聯網,如有侵權,請聯系我們刪除,謝謝!
網絡推廣與網站優化公司(網絡優化與推廣專家)作為數字營銷領域的核心服務提供方,其價值在于通過技術手段與策略規劃幫助企業提升線上曝光度、用戶轉化率及品牌影響力。這...
在當今數字化時代,公司網站已成為企業展示形象、傳遞信息和開展業務的重要平臺。然而,對于許多公司來說,網站建設的價格是一個關鍵考量因素。本文將圍繞“公司網站建設價...
在當今的數字化時代,企業網站已成為企業展示形象、吸引客戶和開展業務的重要平臺。然而,對于許多中小企業來說,高昂的網站建設費用可能會成為其發展的瓶頸。幸運的是,隨...
flash如何轉換成APK?如果只有swf文件,我還沒有 沒聽說有什么方法可以把它們轉換成apk,或者可以先用反編譯軟件導出源文件。如果有源文件,那 這很容易。你 最好有新版的flash,最好是cs6,或者cc,或者至少是cs5.5。安裝可以直接發布為apk文件,但是如果要在真實機器上運行,必須配備air環境。在Flash怎么打開flash應用程序格式?使用sothink swf decompil...
在bios里quickboot是什么意思?BIOS中的快速引導也是快速引導的功能。此功能開啟后,電腦啟動時不會進行完全自檢,以加快系統的啟動速度。BIOS:1。BIOS是英文“basic input output system”的縮寫,其中文直譯為“basic input output system”。實際上,它是一組固化在計算機主板上的ROM芯片上的程序。它存儲了計算機最重要的基本輸入輸出程序、...
安卓平板怎么投屏到電腦?將平板電腦和電腦連接到同一個熱點,完成屏幕投影。安卓平板可以連接主機當顯示器用嗎?可以,但是比較麻煩。首先下載軟件(電腦和手機打包的),安裝電腦。電腦安裝運行后,屏幕會在這里閃幾次。閃爍后右下角會有一個灰色的雙屏圖標,然后用數據線連接平板。如果提示安裝驅動,可以用91助手等軟件安裝,然后在平板上運行軟件,點擊usb連接,等待即可。連接后,電腦右下角的灰標亮起。然后,你可以在...