本文整理汇总了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;未经允许,请勿转载。 |
请发表评论