當前位置: 首頁>>代碼示例>>Java>>正文


Java PapeResponse類代碼示例

本文整理匯總了Java中org.openid4java.message.pape.PapeResponse的典型用法代碼示例。如果您正苦於以下問題:Java PapeResponse類的具體用法?Java PapeResponse怎麽用?Java PapeResponse使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


PapeResponse類屬於org.openid4java.message.pape包,在下文中一共展示了PapeResponse類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getMessageExtension

import org.openid4java.message.pape.PapeResponse; //導入依賴的package包/類
/**
 * {@inheritDoc}
 */
@Override
public MessageExtension getMessageExtension(String userId, String profileName, OpenIDAuthRequestDTO requestDTO)
        throws IdentityException {

    MessageExtension message = null;
    PapeResponse papeResponse = null;
    AuthRequest authRequest = null;

    try {
        authRequest = request.getAuthRequest();

        if (authRequest != null) {
            message = authRequest.getExtension(PapeMessage.OPENID_NS_PAPE);

            if (message instanceof PapeRequest) {
                papeResponse = PapeResponse.createPapeResponse();
                if (request.isPhishingResistanceLogin()) {
                    papeResponse.addAuthPolicy(PapeMessage.PAPE_POLICY_PHISHING_RESISTANT);
                    //papeResponse.setNistAuthLevel(1);  TODO
                }
                if (request.isMultifactorLogin()) {
                    papeResponse.addAuthPolicy(PapeMessage.PAPE_POLICY_MULTI_FACTOR);
                    //papeResponse.setNistAuthLevel(2);  TODO
                }
            }
        }
    } catch (MessageException e) {
        log.error("Failed to create message extension for PAPE", e);
        throw IdentityException.error("Failed to create message extension for PAPE", e);
    }

    return papeResponse;
}
 
開發者ID:wso2-attic,項目名稱:carbon-identity,代碼行數:37,代碼來源:OpenIDPape.java


注:本文中的org.openid4java.message.pape.PapeResponse類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。