当前位置: 首页>>代码示例>>Java>>正文


Java AuthenticationMode.PRO_ACTIVE属性代码示例

本文整理汇总了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;
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:16,代码来源:SecurityContextImpl.java

示例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;
}
 
开发者ID:SoftInstigate,项目名称:restheart,代码行数:27,代码来源:PipedHttpHandler.java

示例3: SecurityContextImpl

public SecurityContextImpl(final HttpServerExchange exchange, final IdentityManager identityManager) {
    this(exchange, AuthenticationMode.PRO_ACTIVE, identityManager);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:3,代码来源:SecurityContextImpl.java


注:本文中的io.undertow.security.api.AuthenticationMode.PRO_ACTIVE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。