<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
    主站蜘蛛池模板: 中美日韩在线网免费毛片视频| 亚洲伊人久久大香线蕉在观| 蜜臀亚洲AV无码精品国产午夜.| 69式国产真人免费视频| 亚洲视频在线观看地址| 男女午夜24式免费视频| 亚洲国产美女精品久久久久∴| 国产精品成人啪精品视频免费| 久久久久亚洲精品男人的天堂| 日韩大片在线永久免费观看网站| 国产美女a做受大片免费| 无码亚洲成a人在线观看| 国产成人3p视频免费观看| 国产亚洲精品仙踪林在线播放| 国产jizzjizz免费看jizz| 青青青视频免费观看| 中文字幕一精品亚洲无线一区| 国产精品免费视频观看拍拍| 亚洲熟妇中文字幕五十中出| 永久在线观看免费视频| 亚洲综合男人的天堂色婷婷| 青娱分类视频精品免费2| 亚洲综合一区二区三区四区五区| 最近中文字幕免费mv视频8| 亚洲av日韩aⅴ无码色老头| 亚洲国产综合久久天堂| 十八禁视频在线观看免费无码无遮挡骂过 | 97性无码区免费| 亚洲日韩精品A∨片无码加勒比| 免费在线黄色网址| 97在线免费视频| 亚洲欧洲综合在线| 日本高清免费网站| 国产免费阿v精品视频网址| 亚洲黄色在线观看视频| 青青青国产免费一夜七次郎| 久久久精品国产亚洲成人满18免费网站 | 亚洲综合综合在线| 免费看男女下面日出水视频| 日本免费中文字幕| 亚洲精品永久在线观看|