本文整理汇总了Java中org.apereo.cas.authentication.AuthenticationHandler类的典型用法代码示例。如果您正苦于以下问题:Java AuthenticationHandler类的具体用法?Java AuthenticationHandler怎么用?Java AuthenticationHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AuthenticationHandler类属于org.apereo.cas.authentication包,在下文中一共展示了AuthenticationHandler类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: bindModeSearchDatabaseAuthenticationHandler
import org.apereo.cas.authentication.AuthenticationHandler; //导入依赖的package包/类
private AuthenticationHandler bindModeSearchDatabaseAuthenticationHandler(final JdbcAuthenticationProperties.Bind b) {
final BindModeSearchDatabaseAuthenticationHandler h = new BindModeSearchDatabaseAuthenticationHandler(b.getName(), servicesManager,
jdbcPrincipalFactory(), b.getOrder(), Beans.newDataSource(b));
h.setPasswordEncoder(Beans.newPasswordEncoder(b.getPasswordEncoder()));
h.setPrincipalNameTransformer(Beans.newPrincipalNameTransformer(b.getPrincipalTransformation()));
if (bindSearchPasswordPolicyConfiguration != null) {
h.setPasswordPolicyConfiguration(bindSearchPasswordPolicyConfiguration);
}
h.setPrincipalNameTransformer(Beans.newPrincipalNameTransformer(b.getPrincipalTransformation()));
if (StringUtils.isNotBlank(b.getCredentialCriteria())) {
h.setCredentialSelectionPredicate(Beans.newCredentialSelectionPredicate(b.getCredentialCriteria()));
}
LOGGER.debug("Created authentication handler [{}] to handle database url at [{}]", h.getName(), b.getUrl());
return h;
}
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:20,代码来源:CasJdbcAuthenticationConfiguration.java
示例2: queryAndEncodeDatabaseAuthenticationHandler
import org.apereo.cas.authentication.AuthenticationHandler; //导入依赖的package包/类
private AuthenticationHandler queryAndEncodeDatabaseAuthenticationHandler(final JdbcAuthenticationProperties.Encode b) {
final QueryAndEncodeDatabaseAuthenticationHandler h = new QueryAndEncodeDatabaseAuthenticationHandler(b.getName(), servicesManager,
jdbcPrincipalFactory(), b.getOrder(), Beans.newDataSource(b), b.getAlgorithmName(), b.getSql(), b.getPasswordFieldName(),
b.getSaltFieldName(), b.getExpiredFieldName(), b.getDisabledFieldName(), b.getNumberOfIterationsFieldName(), b.getNumberOfIterations(),
b.getStaticSalt());
h.setPasswordEncoder(Beans.newPasswordEncoder(b.getPasswordEncoder()));
h.setPrincipalNameTransformer(Beans.newPrincipalNameTransformer(b.getPrincipalTransformation()));
if (queryAndEncodePasswordPolicyConfiguration != null) {
h.setPasswordPolicyConfiguration(queryAndEncodePasswordPolicyConfiguration);
}
h.setPrincipalNameTransformer(Beans.newPrincipalNameTransformer(b.getPrincipalTransformation()));
if (StringUtils.isNotBlank(b.getCredentialCriteria())) {
h.setCredentialSelectionPredicate(Beans.newCredentialSelectionPredicate(b.getCredentialCriteria()));
}
LOGGER.debug("Created authentication handler [{}] to handle database url at [{}]", h.getName(), b.getUrl());
return h;
}
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:23,代码来源:CasJdbcAuthenticationConfiguration.java
示例3: queryDatabaseAuthenticationHandler
import org.apereo.cas.authentication.AuthenticationHandler; //导入依赖的package包/类
private AuthenticationHandler queryDatabaseAuthenticationHandler(final JdbcAuthenticationProperties.Query b) {
final Map<String, String> attributes = Beans.transformPrincipalAttributesListIntoMap(b.getPrincipalAttributeList());
LOGGER.debug("Created and mapped principal attributes [{}] for [{}]...", attributes, b.getUrl());
final QueryDatabaseAuthenticationHandler h = new QueryDatabaseAuthenticationHandler(b.getName(), servicesManager,
jdbcPrincipalFactory(), b.getOrder(),
Beans.newDataSource(b), b.getSql(), b.getFieldPassword(),
b.getFieldExpired(), b.getFieldDisabled(), attributes);
h.setPasswordEncoder(Beans.newPasswordEncoder(b.getPasswordEncoder()));
h.setPrincipalNameTransformer(Beans.newPrincipalNameTransformer(b.getPrincipalTransformation()));
if (queryPasswordPolicyConfiguration != null) {
h.setPasswordPolicyConfiguration(queryPasswordPolicyConfiguration);
}
h.setPrincipalNameTransformer(Beans.newPrincipalNameTransformer(b.getPrincipalTransformation()));
if (StringUtils.isNotBlank(b.getCredentialCriteria())) {
h.setCredentialSelectionPredicate(Beans.newCredentialSelectionPredicate(b.getCredentialCriteria()));
}
LOGGER.debug("Created authentication handler [{}] to handle database url at [{}]", h.getName(), b.getUrl());
return h;
}
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:26,代码来源:CasJdbcAuthenticationConfiguration.java
示例4: searchModeSearchDatabaseAuthenticationHandler
import org.apereo.cas.authentication.AuthenticationHandler; //导入依赖的package包/类
private AuthenticationHandler searchModeSearchDatabaseAuthenticationHandler(final JdbcAuthenticationProperties.Search b) {
final SearchModeSearchDatabaseAuthenticationHandler h = new SearchModeSearchDatabaseAuthenticationHandler(b.getName(), servicesManager,
jdbcPrincipalFactory(), b.getOrder(), Beans.newDataSource(b), b.getFieldUser(), b.getFieldPassword(), b.getTableUsers());
h.setPasswordEncoder(Beans.newPasswordEncoder(b.getPasswordEncoder()));
h.setPrincipalNameTransformer(Beans.newPrincipalNameTransformer(b.getPrincipalTransformation()));
h.setPrincipalNameTransformer(Beans.newPrincipalNameTransformer(b.getPrincipalTransformation()));
if (searchModePasswordPolicyConfiguration != null) {
h.setPasswordPolicyConfiguration(searchModePasswordPolicyConfiguration);
}
if (StringUtils.isNotBlank(b.getCredentialCriteria())) {
h.setCredentialSelectionPredicate(Beans.newCredentialSelectionPredicate(b.getCredentialCriteria()));
}
LOGGER.debug("Created authentication handler [{}] to handle database url at [{}]", h.getName(), b.getUrl());
return h;
}
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:20,代码来源:CasJdbcAuthenticationConfiguration.java
示例5: duoAuthenticationHandler
import org.apereo.cas.authentication.AuthenticationHandler; //导入依赖的package包/类
@RefreshScope
@Bean
public AuthenticationHandler duoAuthenticationHandler() {
final DuoAuthenticationHandler h;
final List<MultifactorAuthenticationProperties.Duo> duos = casProperties.getAuthn().getMfa().getDuo();
if (!duos.isEmpty()) {
final String name = duos.get(0).getName();
if (duos.size() > 1) {
LOGGER.debug("Multiple Duo Security providers are available; Duo authentication handler is named after [{}]", name);
}
h = new DuoAuthenticationHandler(name, servicesManager, duoPrincipalFactory(), duoMultifactorAuthenticationProvider());
} else {
h = new DuoAuthenticationHandler(StringUtils.EMPTY, servicesManager, duoPrincipalFactory(), duoMultifactorAuthenticationProvider());
throw new BeanCreationException("No configuration/settings could be found for Duo Security. Review settings and ensure the correct syntax is used");
}
return h;
}
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:18,代码来源:DuoSecurityAuthenticationEventExecutionPlanConfiguration.java
示例6: jaasAuthenticationHandlers
import org.apereo.cas.authentication.AuthenticationHandler; //导入依赖的package包/类
@ConditionalOnMissingBean(name = "jaasAuthenticationHandlers")
@RefreshScope
@Bean
public List<AuthenticationHandler> jaasAuthenticationHandlers() {
return casProperties.getAuthn().getJaas()
.stream()
.filter(jaas -> StringUtils.isNotBlank(jaas.getRealm()))
.map(jaas -> {
final JaasAuthenticationHandler h = new JaasAuthenticationHandler(jaas.getName(),
servicesManager, jaasPrincipalFactory(), null);
h.setKerberosKdcSystemProperty(jaas.getKerberosKdcSystemProperty());
h.setKerberosRealmSystemProperty(jaas.getKerberosRealmSystemProperty());
h.setRealm(jaas.getRealm());
h.setPasswordEncoder(Beans.newPasswordEncoder(jaas.getPasswordEncoder()));
if (jaasPasswordPolicyConfiguration != null) {
h.setPasswordPolicyConfiguration(jaasPasswordPolicyConfiguration);
}
h.setPrincipalNameTransformer(Beans.newPrincipalNameTransformer(jaas.getPrincipalTransformation()));
h.setCredentialSelectionPredicate(Beans.newCredentialSelectionPredicate(jaas.getCredentialCriteria()));
return h;
})
.collect(Collectors.toList());
}
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:26,代码来源:CasCoreAuthenticationHandlersConfiguration.java
示例7: examineResolve
import org.apereo.cas.authentication.AuthenticationHandler; //导入依赖的package包/类
@Test
public void examineResolve() throws Exception {
final Principal principalOut = principalFactory.createPrincipal("output");
final Credential credential = mock(Credential.class);
when(credential.getId()).thenReturn("input");
final PrincipalResolver resolver1 = mock(PrincipalResolver.class);
when(resolver1.supports(eq(credential))).thenReturn(true);
when(resolver1.resolve(eq(credential), any(Principal.class),
any(AuthenticationHandler.class)))
.thenReturn(principalOut);
final PrincipalResolver resolver2 = mock(PrincipalResolver.class);
when(resolver2.supports(any(Credential.class))).thenReturn(true);
when(resolver2.resolve(any(Credential.class), any(Principal.class),
any(AuthenticationHandler.class)))
.thenReturn(principalFactory.createPrincipal("output", Collections.<String, Object>singletonMap("mail", "[email protected]")));
final ChainingPrincipalResolver resolver = new ChainingPrincipalResolver();
resolver.setChain(Arrays.asList(resolver1, resolver2));
final Principal principal = resolver.resolve(credential,
principalOut,
new SimpleTestUsernamePasswordAuthenticationHandler());
assertEquals("output", principal.getId());
assertEquals("[email protected]", principal.getAttributes().get("mail"));
}
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:27,代码来源:ChainingPrincipalResolverTests.java
示例8: verifyAllowsAccessToHighSecurityServiceWithPasswordAndOTPViaRenew
import org.apereo.cas.authentication.AuthenticationHandler; //导入依赖的package包/类
@Test
public void verifyAllowsAccessToHighSecurityServiceWithPasswordAndOTPViaRenew() throws Exception {
// Note the original credential used to start SSO session does not satisfy security policy
final AuthenticationResult ctx2 = processAuthenticationAttempt(HIGH_SERVICE, newUserPassCredentials(ALICE, ALICE),
new OneTimePasswordCredential(ALICE, PASSWORD_31415));
final TicketGrantingTicket tgt = cas.createTicketGrantingTicket(ctx2);
assertNotNull(tgt);
final ServiceTicket st = cas.grantServiceTicket(tgt.getId(), HIGH_SERVICE, ctx2);
assertNotNull(st);
// Confirm the authentication in the assertion is the one that satisfies security policy
final Assertion assertion = cas.validateServiceTicket(st.getId(), HIGH_SERVICE);
assertEquals(2, assertion.getPrimaryAuthentication().getSuccesses().size());
assertTrue(assertion.getPrimaryAuthentication().getSuccesses().containsKey(AcceptUsersAuthenticationHandler.class.getSimpleName()));
assertTrue(assertion.getPrimaryAuthentication().getSuccesses().containsKey(TestOneTimePasswordAuthenticationHandler.class.getSimpleName()));
assertTrue(assertion.getPrimaryAuthentication().getAttributes().containsKey(AuthenticationHandler.SUCCESSFUL_AUTHENTICATION_HANDLERS));
}
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:20,代码来源:MultifactorAuthenticationTests.java
示例9: jdbcAuthenticationHandlers
import org.apereo.cas.authentication.AuthenticationHandler; //导入依赖的package包/类
@ConditionalOnMissingBean(
name = {"jdbcAuthenticationHandlers"}
)
@Bean
@RefreshScope
public Collection<AuthenticationHandler> jdbcAuthenticationHandlers() {
HashSet handlers = new HashSet();
JdbcAuthenticationProperties jdbc = this.casProperties.getAuthn().getJdbc();
jdbc.getBind().forEach((b) -> {
handlers.add(this.bindModeSearchDatabaseAuthenticationHandler(b));
});
jdbc.getEncode().forEach((b) -> {
handlers.add(this.queryAndEncodeDatabaseAuthenticationHandler(b));
});
jdbc.getQuery().forEach((b) -> {
handlers.add(this.queryDatabaseAuthenticationHandler(b));
});
jdbc.getSearch().forEach((b) -> {
handlers.add(this.searchModeSearchDatabaseAuthenticationHandler(b));
});
return handlers;
}
开发者ID:guolf,项目名称:cas-overlay,代码行数:23,代码来源:MyJdbcAuthenticationHandlers.java
示例10: bindModeSearchDatabaseAuthenticationHandler
import org.apereo.cas.authentication.AuthenticationHandler; //导入依赖的package包/类
private AuthenticationHandler bindModeSearchDatabaseAuthenticationHandler(JdbcAuthenticationProperties.Bind b) {
BindModeSearchDatabaseAuthenticationHandler h = new BindModeSearchDatabaseAuthenticationHandler(b.getName(), this.servicesManager, this.jdbcPrincipalFactory(), b.getOrder(), Beans.newDataSource(b));
h.setPasswordEncoder(Beans.newPasswordEncoder(b.getPasswordEncoder()));
h.setPrincipalNameTransformer(Beans.newPrincipalNameTransformer(b.getPrincipalTransformation()));
if (this.bindSearchPasswordPolicyConfiguration != null) {
h.setPasswordPolicyConfiguration(this.bindSearchPasswordPolicyConfiguration);
}
h.setPrincipalNameTransformer(Beans.newPrincipalNameTransformer(b.getPrincipalTransformation()));
if (StringUtils.isNotBlank(b.getCredentialCriteria())) {
h.setCredentialSelectionPredicate(Beans.newCredentialSelectionPredicate(b.getCredentialCriteria()));
}
LOGGER.debug("Created authentication handler [{}] to handle database url at [{}]", h.getName(), b.getUrl());
return h;
}
开发者ID:guolf,项目名称:cas-overlay,代码行数:17,代码来源:MyJdbcAuthenticationHandlers.java
示例11: queryAndEncodeDatabaseAuthenticationHandler
import org.apereo.cas.authentication.AuthenticationHandler; //导入依赖的package包/类
private AuthenticationHandler queryAndEncodeDatabaseAuthenticationHandler(JdbcAuthenticationProperties.Encode b) {
QueryAndEncodeDatabaseAuthenticationHandler h = new QueryAndEncodeDatabaseAuthenticationHandler(b.getName(), this.servicesManager, this.jdbcPrincipalFactory(), Integer.valueOf(b.getOrder()), Beans.newDataSource(b), b.getAlgorithmName(), b.getSql(), b.getPasswordFieldName(), b.getSaltFieldName(), b.getExpiredFieldName(), b.getDisabledFieldName(), b.getNumberOfIterationsFieldName(), b.getNumberOfIterations(), b.getStaticSalt());
h.setPasswordEncoder(Beans.newPasswordEncoder(b.getPasswordEncoder()));
h.setPrincipalNameTransformer(Beans.newPrincipalNameTransformer(b.getPrincipalTransformation()));
if (this.queryAndEncodePasswordPolicyConfiguration != null) {
h.setPasswordPolicyConfiguration(this.queryAndEncodePasswordPolicyConfiguration);
}
h.setPrincipalNameTransformer(Beans.newPrincipalNameTransformer(b.getPrincipalTransformation()));
if (StringUtils.isNotBlank(b.getCredentialCriteria())) {
h.setCredentialSelectionPredicate(Beans.newCredentialSelectionPredicate(b.getCredentialCriteria()));
}
LOGGER.debug("Created authentication handler [{}] to handle database url at [{}]", h.getName(), b.getUrl());
return h;
}
开发者ID:guolf,项目名称:cas-overlay,代码行数:17,代码来源:MyJdbcAuthenticationHandlers.java
示例12: queryDatabaseAuthenticationHandler
import org.apereo.cas.authentication.AuthenticationHandler; //导入依赖的package包/类
private AuthenticationHandler queryDatabaseAuthenticationHandler(JdbcAuthenticationProperties.Query b) {
Map attributes = Beans.transformPrincipalAttributesListIntoMap(b.getPrincipalAttributeList());
LOGGER.debug("Created and mapped principal attributes [{}] for [{}]...", attributes, b.getUrl());
MyQueryDatabaseAuthenticationHandler h = new MyQueryDatabaseAuthenticationHandler(b.getName(), this.servicesManager, this.jdbcPrincipalFactory(), Integer.valueOf(b.getOrder()), Beans.newDataSource(b), b.getSql(), b.getFieldPassword(), b.getFieldExpired(), b.getFieldDisabled(), attributes);
h.setPasswordEncoder(Beans.newPasswordEncoder(b.getPasswordEncoder()));
h.setPrincipalNameTransformer(Beans.newPrincipalNameTransformer(b.getPrincipalTransformation()));
if (this.queryPasswordPolicyConfiguration != null) {
h.setPasswordPolicyConfiguration(this.queryPasswordPolicyConfiguration);
}
h.setPrincipalNameTransformer(Beans.newPrincipalNameTransformer(b.getPrincipalTransformation()));
if (StringUtils.isNotBlank(b.getCredentialCriteria())) {
h.setCredentialSelectionPredicate(Beans.newCredentialSelectionPredicate(b.getCredentialCriteria()));
}
LOGGER.debug("Created authentication handler [{}] to handle database url at [{}]", h.getName(), b.getUrl());
return h;
}
开发者ID:guolf,项目名称:cas-overlay,代码行数:19,代码来源:MyJdbcAuthenticationHandlers.java
示例13: searchModeSearchDatabaseAuthenticationHandler
import org.apereo.cas.authentication.AuthenticationHandler; //导入依赖的package包/类
private AuthenticationHandler searchModeSearchDatabaseAuthenticationHandler(JdbcAuthenticationProperties.Search b) {
SearchModeSearchDatabaseAuthenticationHandler h = new SearchModeSearchDatabaseAuthenticationHandler(b.getName(), this.servicesManager, this.jdbcPrincipalFactory(), Integer.valueOf(b.getOrder()), Beans.newDataSource(b), b.getFieldUser(), b.getFieldPassword(), b.getTableUsers());
h.setPasswordEncoder(Beans.newPasswordEncoder(b.getPasswordEncoder()));
h.setPrincipalNameTransformer(Beans.newPrincipalNameTransformer(b.getPrincipalTransformation()));
h.setPrincipalNameTransformer(Beans.newPrincipalNameTransformer(b.getPrincipalTransformation()));
if (this.searchModePasswordPolicyConfiguration != null) {
h.setPasswordPolicyConfiguration(this.searchModePasswordPolicyConfiguration);
}
if (StringUtils.isNotBlank(b.getCredentialCriteria())) {
h.setCredentialSelectionPredicate(Beans.newCredentialSelectionPredicate(b.getCredentialCriteria()));
}
LOGGER.debug("Created authentication handler [{}] to handle database url at [{}]", h.getName(), b.getUrl());
return h;
}
开发者ID:guolf,项目名称:cas-overlay,代码行数:17,代码来源:MyJdbcAuthenticationHandlers.java
示例14: jdbcAuthenticationHandlers
import org.apereo.cas.authentication.AuthenticationHandler; //导入依赖的package包/类
@ConditionalOnMissingBean(name = "jdbcAuthenticationHandlers")
@Bean
@RefreshScope
public Collection<AuthenticationHandler> jdbcAuthenticationHandlers() {
final Collection<AuthenticationHandler> handlers = new HashSet<>();
final JdbcAuthenticationProperties jdbc = casProperties.getAuthn().getJdbc();
jdbc.getBind().forEach(b -> handlers.add(bindModeSearchDatabaseAuthenticationHandler(b)));
jdbc.getEncode().forEach(b -> handlers.add(queryAndEncodeDatabaseAuthenticationHandler(b)));
jdbc.getQuery().forEach(b -> handlers.add(queryDatabaseAuthenticationHandler(b)));
jdbc.getSearch().forEach(b -> handlers.add(searchModeSearchDatabaseAuthenticationHandler(b)));
return handlers;
}
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:13,代码来源:CasJdbcAuthenticationConfiguration.java
示例15: newAuthenticationBuilder
import org.apereo.cas.authentication.AuthenticationHandler; //导入依赖的package包/类
private static AuthenticationBuilder newAuthenticationBuilder(final Principal principal) {
final CredentialMetaData meta = new BasicCredentialMetaData(new UsernamePasswordCredential());
final AuthenticationHandler handler = new SimpleTestUsernamePasswordAuthenticationHandler();
return new DefaultAuthenticationBuilder(principal)
.addCredential(meta)
.addSuccess("test", new DefaultHandlerResult(handler, meta));
}
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:8,代码来源:SamlAuthenticationMetaDataPopulatorTests.java
示例16: clientAuthenticationHandler
import org.apereo.cas.authentication.AuthenticationHandler; //导入依赖的package包/类
@RefreshScope
@Bean
public AuthenticationHandler clientAuthenticationHandler() {
final ClientAuthenticationHandler h = new ClientAuthenticationHandler(casProperties.getAuthn().getPac4j().getName(), servicesManager,
clientPrincipalFactory(), builtClients());
h.setTypedIdUsed(casProperties.getAuthn().getPac4j().isTypedIdUsed());
return h;
}
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:9,代码来源:Pac4jAuthenticationEventExecutionPlanConfiguration.java
示例17: googleAuthenticatorAuthenticationHandler
import org.apereo.cas.authentication.AuthenticationHandler; //导入依赖的package包/类
@ConditionalOnMissingBean(name = "googleAuthenticatorAuthenticationHandler")
@Bean
@RefreshScope
public AuthenticationHandler googleAuthenticatorAuthenticationHandler() {
return new GoogleAuthenticatorAuthenticationHandler(casProperties.getAuthn().getMfa().getGauth().getName(), servicesManager, googlePrincipalFactory(),
googleAuthenticatorInstance(), oneTimeTokenAuthenticatorTokenRepository, googleAuthenticatorAccountRegistry);
}
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:8,代码来源:GoogleAuthenticatorAuthenticationEventExecutionPlanConfiguration.java
示例18: remoteAddressAuthenticationHandler
import org.apereo.cas.authentication.AuthenticationHandler; //导入依赖的package包/类
@Bean
@RefreshScope
public AuthenticationHandler remoteAddressAuthenticationHandler() {
final RemoteAddressAuthenticationProperties remoteAddress = casProperties.getAuthn().getRemoteAddress();
final RemoteAddressAuthenticationHandler bean = new RemoteAddressAuthenticationHandler(remoteAddress.getName(), servicesManager,
remoteAddressPrincipalFactory());
bean.setIpNetworkRange(remoteAddress.getIpAddressRange());
return bean;
}
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:10,代码来源:CasRemoteAuthenticationConfiguration.java
示例19: rejectUsersAuthenticationHandler
import org.apereo.cas.authentication.AuthenticationHandler; //导入依赖的package包/类
@RefreshScope
@Bean
public AuthenticationHandler rejectUsersAuthenticationHandler() {
final RejectAuthenticationProperties rejectProperties = casProperties.getAuthn().getReject();
final Set<String> users = org.springframework.util.StringUtils.commaDelimitedListToSet(rejectProperties.getUsers());
final RejectUsersAuthenticationHandler h = new RejectUsersAuthenticationHandler(rejectProperties.getName(), servicesManager,
rejectUsersPrincipalFactory(), users);
h.setPasswordEncoder(Beans.newPasswordEncoder(rejectProperties.getPasswordEncoder()));
if (rejectPasswordPolicyConfiguration != null) {
h.setPasswordPolicyConfiguration(rejectPasswordPolicyConfiguration);
}
h.setPrincipalNameTransformer(Beans.newPrincipalNameTransformer(rejectProperties.getPrincipalTransformation()));
return h;
}
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:15,代码来源:RejectUsersAuthenticationEventExecutionPlanConfiguration.java
示例20: fileAuthenticationHandler
import org.apereo.cas.authentication.AuthenticationHandler; //导入依赖的package包/类
@RefreshScope
@Bean
public AuthenticationHandler fileAuthenticationHandler() {
final FileAuthenticationProperties fileProperties = casProperties.getAuthn().getFile();
final FileAuthenticationHandler h = new FileAuthenticationHandler(fileProperties.getName(), servicesManager, filePrincipalFactory(),
fileProperties.getFilename(), fileProperties.getSeparator());
h.setPasswordEncoder(Beans.newPasswordEncoder(fileProperties.getPasswordEncoder()));
if (filePasswordPolicyConfiguration != null) {
h.setPasswordPolicyConfiguration(filePasswordPolicyConfiguration);
}
h.setPrincipalNameTransformer(Beans.newPrincipalNameTransformer(fileProperties.getPrincipalTransformation()));
return h;
}
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:16,代码来源:FileAuthenticationEventExecutionPlanConfiguration.java
注:本文中的org.apereo.cas.authentication.AuthenticationHandler类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论