<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Oracle神諭

      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
      284 隨筆 :: 9 文章 :: 106 評論 :: 0 Trackbacks
    public interface LoginModule
    
    

    LoginModule describes the interface implemented by authentication technology providers. LoginModules are plugged in under applications to provide a particular type of authentication.

    While applications write to the LoginContext API, authentication technology providers implement the LoginModule interface. A Configuration specifies the LoginModule(s) to be used with a particular login application. Therefore different LoginModules can be plugged in under the application without requiring any modifications to the application itself.

    The LoginContext is responsible<負責> for reading the Configuration and instantiating the appropriate<適當的> LoginModules. Each LoginModule is initialized with a Subject, a CallbackHandler, shared LoginModule state, and LoginModule-specific options. The Subject represents the Subject currently being authenticated and is updated with relevant<相關> Credentials<憑證> if authentication succeeds. LoginModules use the CallbackHandler to communicate with users. The CallbackHandler may be used to prompt for usernames and passwords, for example. Note that the CallbackHandler may be null. LoginModules which absolutely require a CallbackHandler to authenticate<認證> the Subject may throw a LoginException. LoginModules optionally use the shared state to share information or data among themselves.

    NameCallback:
    PasswordCallback:

    The LoginModule-specific options represent the options configured for this LoginModule by an administrator or user in the login Configuration. The options are defined by the LoginModule itself and control the behavior within it. For example, a LoginModule may define options to support debugging/testing capabilities<能力>. Options are defined using a key-value syntax, such as debug=true. The LoginModule stores the options as a Map so that the values may be retrieved using the key. Note that there is no limit to the number of options a LoginModule chooses to define.

    The calling application sees the authentication process as a single operation. However, the authentication process within the LoginModule proceeds in two distinct phases. In the first phase, the LoginModule's login method gets invoked by the LoginContext's login method. The login method for the LoginModule then performs the actual authentication (prompt for and verify a password for example) and saves its authentication status as private state information. Once finished, the LoginModule's login method either returns true (if it succeeded) or false (if it should be ignored), or throws a LoginException to specify a failure. In the failure case, the LoginModule must not retry the authentication or introduce delays. The responsibility of such tasks belongs to the application. If the application attempts to retry the authentication, the LoginModule's login method will be called again.

    In the second phase, if the LoginContext's overall<全面> authentication succeeded (the relevant REQUIRED, REQUISITE<需求>, SUFFICIENT<足夠> and OPTIONAL LoginModules succeeded), then the commit method for the LoginModule gets invoked. The commit method for a LoginModule checks its privately saved state to see if its own authentication succeeded. If the overall LoginContext authentication succeeded and the LoginModule's own authentication succeeded, then the commit method associates the relevant<相關> Principals (authenticated identities) and Credentials<憑證> (authentication data such as cryptographic keys) with the Subject located within the LoginModule.

    If the LoginContext's overall authentication failed (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules did not succeed), then the abort(異常) method for each LoginModule gets invoked. In this case, the LoginModule removes/destroys any authentication state originally saved.

    Logging out a Subject involves only one phase. The LoginContext invokes the LoginModule's logout method. The logout method for the LoginModule then performs the logout procedures, such as removing Principals or Credentials from the Subject or logging session information.

    A LoginModule implementation must have a constructor with no arguments<無參數構造子>. This allows classes which load the LoginModule to instantiate it.

    posted on 2005-09-18 21:44 java世界暢談 閱讀(368) 評論(0)  編輯  收藏 所屬分類: JAVA
    主站蜘蛛池模板: 亚洲中文字幕一区精品自拍| 亚洲欧洲∨国产一区二区三区| 亚洲精品日韩专区silk| 国产午夜精品免费一区二区三区| 国产偷国产偷亚洲高清日韩| 精品国产福利尤物免费| 亚洲一区无码中文字幕| 成全在线观看免费观看大全| 亚洲嫩模在线观看| 日本免费一区二区在线观看| 亚洲国产成人精品电影| 嫩草视频在线免费观看| 婷婷亚洲综合五月天小说在线| 亚洲va中文字幕无码| 你懂得的在线观看免费视频| 日产亚洲一区二区三区| 青娱乐免费视频在线观看| 亚洲无码一区二区三区| 伊在人亚洲香蕉精品区麻豆| 三级毛片在线免费观看| 日木av无码专区亚洲av毛片| 好男人视频社区精品免费| 国产精品亚洲一区二区无码| 国产亚洲精品国看不卡| 最近中文字幕免费完整| 亚洲暴爽av人人爽日日碰| 亚洲午夜爱爱香蕉片| 91大神免费观看| 大桥未久亚洲无av码在线| 亚洲人成色777777在线观看| 天天影院成人免费观看| 羞羞漫画登录页面免费| 亚洲av伊人久久综合密臀性色| 国产免费的野战视频| 免费VA在线观看无码| 青青草原精品国产亚洲av| 青青久在线视频免费观看| a一级毛片免费高清在线| 久久亚洲AV成人无码| 四虎影在线永久免费观看| 一级毛片免费观看不卡视频|