本文整理汇总了Java中io.undertow.security.api.AuthenticationMode.PRO_ACTIVE属性的典型用法代码示例。如果您正苦于以下问题:Java AuthenticationMode.PRO_ACTIVE属性的具体用法?Java AuthenticationMode.PRO_ACTIVE怎么用?Java AuthenticationMode.PRO_ACTIVE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类io.undertow.security.api.AuthenticationMode
的用法示例。
在下文中一共展示了AuthenticationMode.PRO_ACTIVE属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: authTransitionRequired
private boolean authTransitionRequired() {
switch (authenticationState) {
case NOT_ATTEMPTED:
// There has been no attempt to authenticate the current request so do so either if required or if we are set to
// be pro-active.
return authenticationRequired || authenticationMode == AuthenticationMode.PRO_ACTIVE;
case ATTEMPTED:
// To be ATTEMPTED we know it was not AUTHENTICATED so if it is required we need to transition to send the
// challenges.
return authenticationRequired;
default:
// At this point the state would either be AUTHENTICATED or CHALLENGE_SENT - either of which mean no further
// transitions applicable for this request.
return false;
}
}
示例2: buildSecurityHandlerChain
protected static PipedHttpHandler buildSecurityHandlerChain(
PipedHttpHandler next,
final AccessManager accessManager,
final IdentityManager identityManager,
final List<AuthenticationMechanism> mechanisms) {
PipedHttpHandler handler;
if (accessManager == null) {
throw new IllegalArgumentException("Error, accessManager cannot "
+ "be null. "
+ "Eventually use FullAccessManager "
+ "that gives full access power ");
}
handler = new AuthTokenInjecterHandler(
new AccessManagerHandler(accessManager, next));
handler = new SecurityInitialHandler(AuthenticationMode.PRO_ACTIVE,
identityManager,
new AuthenticationMechanismsHandler(
new AuthenticationConstraintHandler(
new AuthenticationCallHandler(handler),
accessManager),
mechanisms));
return handler;
}
示例3: SecurityContextImpl
public SecurityContextImpl(final HttpServerExchange exchange, final IdentityManager identityManager) {
this(exchange, AuthenticationMode.PRO_ACTIVE, identityManager);
}