本文整理匯總了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;
}