本文整理汇总了Java中org.opensaml.messaging.context.BaseContext类的典型用法代码示例。如果您正苦于以下问题:Java BaseContext类的具体用法?Java BaseContext怎么用?Java BaseContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BaseContext类属于org.opensaml.messaging.context包,在下文中一共展示了BaseContext类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getAuthenticationResponseContext
import org.opensaml.messaging.context.BaseContext; //导入依赖的package包/类
/**
* Helper method to locate authentication response context.
*
* @param ctx
* any context child of profile request context,
* @return Inbound message context or null if not found.
*/
@SuppressWarnings("rawtypes")
private OIDCAuthenticationResponseContext getAuthenticationResponseContext(BaseContext ctx) {
if (ctx == null) {
return null;
}
BaseContext ctxRunner = ctx;
while (ctxRunner.getParent() != null) {
ctxRunner = ctxRunner.getParent();
}
if (ctxRunner instanceof ProfileRequestContext) {
return ((ProfileRequestContext) ctxRunner).getOutboundMessageContext().getSubcontext(
OIDCAuthenticationResponseContext.class, false);
}
return null;
}
开发者ID:CSCfi,项目名称:shibboleth-idp-oidc-extension,代码行数:23,代码来源:AttributeOIDCScopePolicyRule.java
示例2: getOutboundMessageContext
import org.opensaml.messaging.context.BaseContext; //导入依赖的package包/类
/**
* Helper method to locate outbound message context.
*
* @param ctx
* any context child of profile request context,
* @return Outbound message context or null if not found.
*/
@SuppressWarnings("rawtypes")
private MessageContext getOutboundMessageContext(BaseContext ctx) {
if (ctx == null) {
return null;
}
BaseContext ctxRunner = ctx;
while (ctxRunner.getParent() != null) {
ctxRunner = ctxRunner.getParent();
}
if (ctxRunner instanceof ProfileRequestContext) {
return ((ProfileRequestContext) ctxRunner).getOutboundMessageContext();
}
return null;
}
开发者ID:CSCfi,项目名称:shibboleth-idp-oidc-extension,代码行数:22,代码来源:AttributeInOIDCRequestedClaimsMatcher.java
示例3: addContext
import org.opensaml.messaging.context.BaseContext; //导入依赖的package包/类
protected final void addContext(final SAML2MetadataResolver entityId, final BaseContext parentContext,
final QName elementName) {
final EntityDescriptor entityDescriptor;
final RoleDescriptor roleDescriptor;
try {
final CriteriaSet set = new CriteriaSet();
set.add(new EntityIdCriterion(entityId.getEntityId()));
entityDescriptor = this.metadata.resolveSingle(set);
if (entityDescriptor == null) {
throw new SAMLException("Cannot find entity " + entityId + " in metadata provider");
}
final List<RoleDescriptor> list = entityDescriptor.getRoleDescriptors(elementName,
SAMLConstants.SAML20P_NS);
roleDescriptor = CommonHelper.isNotEmpty(list) ? list.get(0) : null;
if (roleDescriptor == null) {
throw new SAMLException("Cannot find entity " + entityId + " or role "
+ elementName + " in metadata provider");
}
} catch (final ResolverException e) {
throw new SAMLException("An error occured while getting IDP descriptors", e);
}
final SAMLMetadataContext mdCtx = parentContext.getSubcontext(SAMLMetadataContext.class, true);
mdCtx.setEntityDescriptor(entityDescriptor);
mdCtx.setRoleDescriptor(roleDescriptor);
}
开发者ID:yaochi,项目名称:pac4j-plus,代码行数:29,代码来源:SAML2ContextProvider.java
注:本文中的org.opensaml.messaging.context.BaseContext类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论