• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java AuthenticationMode类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中io.undertow.security.api.AuthenticationMode的典型用法代码示例。如果您正苦于以下问题:Java AuthenticationMode类的具体用法?Java AuthenticationMode怎么用?Java AuthenticationMode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



AuthenticationMode类属于io.undertow.security.api包,在下文中一共展示了AuthenticationMode类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: authTransitionRequired

import io.undertow.security.api.AuthenticationMode; //导入依赖的package包/类
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,代码行数:17,代码来源:SecurityContextImpl.java


示例2: enableAuthUDICustomizer

import io.undertow.security.api.AuthenticationMode; //导入依赖的package包/类
private UndertowDeploymentInfoCustomizer enableAuthUDICustomizer() {
    return (DeploymentInfo di) -> {
        if(StringUtils.isEmpty(encodedPass)) {
            return;
        }
        SecurityConstraint sc = new SecurityConstraint();
        sc.setEmptyRoleSemantic(SecurityInfo.EmptyRoleSemantic.AUTHENTICATE);
        // empty web resource interpret as default
        sc.addWebResourceCollection(new WebResourceCollection());
        di.addSecurityConstraints(sc);
        di.setSecurityDisabled(false);
        di.setAuthenticationMode(AuthenticationMode.PRO_ACTIVE);
        di.setLoginConfig(new LoginConfig(HttpServletRequest.BASIC_AUTH, "Haven Agent"));
        di.setIdentityManager(new IdentityManagerImpl(encodedPass));
    };
}
 
开发者ID:codeabovelab,项目名称:haven-platform,代码行数:17,代码来源:AuthConfiguration.java


示例3: SecurityInitialHandler

import io.undertow.security.api.AuthenticationMode; //导入依赖的package包/类
public SecurityInitialHandler(final AuthenticationMode authenticationMode, final IdentityManager identityManager,
        final String programaticMechName, final SecurityContextFactory contextFactory, final HttpHandler next) {
    this.authenticationMode = authenticationMode;
    this.identityManager = identityManager;
    this.programaticMechName = programaticMechName;
    this.contextFactory = contextFactory;
    this.next = next;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:9,代码来源:SecurityInitialHandler.java


示例4: SecurityContextImpl

import io.undertow.security.api.AuthenticationMode; //导入依赖的package包/类
public SecurityContextImpl(final HttpServerExchange exchange, final AuthenticationMode authenticationMode, final IdentityManager identityManager) {
    this.authenticationMode = authenticationMode;
    this.identityManager = identityManager;
    this.exchange = exchange;
    if (System.getSecurityManager() != null) {
        System.getSecurityManager().checkPermission(PERMISSION);
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:9,代码来源:SecurityContextImpl.java


示例5: createSecurityContext

import io.undertow.security.api.AuthenticationMode; //导入依赖的package包/类
@Override
public SecurityContext createSecurityContext(final HttpServerExchange exchange, final AuthenticationMode mode,
    final IdentityManager identityManager, final String programmaticMechName) {
    SecurityContextImpl securityContext = SecurityActions.createSecurityContextImpl(exchange, mode, identityManager);
    if (programmaticMechName != null)
        securityContext.setProgramaticMechName(programmaticMechName);
    return securityContext;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:9,代码来源:SecurityContextFactoryImpl.java


示例6: createSecurityContextImpl

import io.undertow.security.api.AuthenticationMode; //导入依赖的package包/类
static SecurityContextImpl createSecurityContextImpl(final HttpServerExchange exchange, final AuthenticationMode authenticationMode, final IdentityManager identityManager) {
    if (System.getSecurityManager() == null) {
        return new SecurityContextImpl(exchange, authenticationMode, identityManager);
    } else {
        return AccessController.doPrivileged(new PrivilegedAction<SecurityContextImpl>() {
            @Override
            public SecurityContextImpl run() {
                return new SecurityContextImpl(exchange, authenticationMode, identityManager);
            }
        });
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:13,代码来源:SecurityActions.java


示例7: SecurityInitialHandler

import io.undertow.security.api.AuthenticationMode; //导入依赖的package包/类
public SecurityInitialHandler(final AuthenticationMode authenticationMode, final IdentityManager identityManager,
        final String programaticMechName,
        final io.undertow.security.api.SecurityContextFactory contextFactory,
        final PipedHttpHandler next) {
    super(next);
    this.authenticationMode = authenticationMode;
    this.identityManager = identityManager;
    this.programaticMechName = programaticMechName;
    this.contextFactory = contextFactory;
}
 
开发者ID:SoftInstigate,项目名称:restheart,代码行数:11,代码来源:SecurityInitialHandler.java


示例8: buildSecurityHandlerChain

import io.undertow.security.api.AuthenticationMode; //导入依赖的package包/类
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,代码行数:28,代码来源:PipedHttpHandler.java


示例9: setAuthenticationMode

import io.undertow.security.api.AuthenticationMode; //导入依赖的package包/类
public LoginConfig setAuthenticationMode(final AuthenticationMode authenticationMode) {
    this.authenticationMode = authenticationMode;
    return this;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:5,代码来源:Undertow.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java CategoryLineAnnotation类代码示例发布时间:2022-05-22
下一篇:
Java ServiceTypeEntry类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap