本文整理汇总了Java中net.shibboleth.idp.authn.context.AuthenticationContext.setIsPassive方法的典型用法代码示例。如果您正苦于以下问题:Java AuthenticationContext.setIsPassive方法的具体用法?Java AuthenticationContext.setIsPassive怎么用?Java AuthenticationContext.setIsPassive使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.shibboleth.idp.authn.context.AuthenticationContext
的用法示例。
在下文中一共展示了AuthenticationContext.setIsPassive方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doExecute
import net.shibboleth.idp.authn.context.AuthenticationContext; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
protected void doExecute(@Nonnull final ProfileRequestContext profileRequestContext) {
log.debug("{} Initializing authentication context", getLogPrefix());
final AuthenticationContext authnCtx = new AuthenticationContext();
if (getAuthenticationRequest().getPrompt() != null) {
authnCtx.setIsPassive(getAuthenticationRequest().getPrompt().contains(Prompt.Type.NONE));
authnCtx.setForceAuthn(getAuthenticationRequest().getPrompt().contains(Prompt.Type.LOGIN));
}
if (getAuthenticationRequest().getLoginHint() != null) {
authnCtx.setHintedName(getAuthenticationRequest().getLoginHint());
}
final AuthenticationContext initialAuthnContext =
profileRequestContext.getSubcontext(AuthenticationContext.class);
if (initialAuthnContext != null) {
authnCtx.setInitialAuthenticationResult(initialAuthnContext.getAuthenticationResult());
}
profileRequestContext.addSubcontext(authnCtx, true);
log.debug("{} Created authentication context: {}", getLogPrefix(), authnCtx);
}
示例2: testNoRequestNoneActivePassive
import net.shibboleth.idp.authn.context.AuthenticationContext; //导入方法依赖的package包/类
@Test
public void testNoRequestNoneActivePassive() {
final AuthenticationContext authCtx = prc.getSubcontext(AuthenticationContext.class);
authCtx.setIsPassive(true);
final Event event = action.execute(src);
Assert.assertNull(authCtx.getAuthenticationResult());
Assert.assertEquals(authCtx.getAttemptedFlow(), authCtx.getPotentialFlows().get(event.getId()));
Assert.assertEquals(authCtx.getAttemptedFlow().getId(), "test2");
}
示例3: doExecute
import net.shibboleth.idp.authn.context.AuthenticationContext; //导入方法依赖的package包/类
@Nonnull
@Override
protected Event doExecute(
final @Nonnull RequestContext springRequestContext,
final @Nonnull ProfileRequestContext<ServiceTicketRequest, Object> profileRequestContext){
final ServiceTicketRequest request = FlowStateSupport.getServiceTicketRequest(springRequestContext);
final AuthenticationContext ac = new AuthenticationContext();
ac.setForceAuthn(request.isRenew());
ac.setIsPassive(false);
profileRequestContext.addSubcontext(ac, true);
profileRequestContext.setBrowserProfile(true);
return Events.Proceed.event(this);
}