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


Java AuthenticationManager类代码示例

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


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

示例1: AuthServiceImpl

import org.springframework.security.authentication.AuthenticationManager; //导入依赖的package包/类
@Autowired
public AuthServiceImpl(
        AuthenticationManager authenticationManager,
        UserDetailsService userDetailsService,
        JwtTokenUtil jwtTokenUtil,
        UsersRepository usersRepository) {
    this.authenticationManager = authenticationManager;
    this.userDetailsService = userDetailsService;
    this.jwtTokenUtil = jwtTokenUtil;
    this.usersRepository = usersRepository;
}
 
开发者ID:CFshuming,项目名称:bf-editor,代码行数:12,代码来源:AuthServiceImpl.java

示例2: AuthorizationServerConfiguration

import org.springframework.security.authentication.AuthenticationManager; //导入依赖的package包/类
public AuthorizationServerConfiguration(@Qualifier("authenticationManagerBean") AuthenticationManager authenticationManager,
                                        TokenStore tokenStore, DataSource dataSource) {
    
    this.authenticationManager = authenticationManager;
    this.tokenStore = tokenStore;
    this.dataSource = dataSource;
}
 
开发者ID:sdcuike,项目名称:spring-boot-oauth2-demo,代码行数:8,代码来源:OAuth2ServerConfiguration.java

示例3: AuthServiceImpl

import org.springframework.security.authentication.AuthenticationManager; //导入依赖的package包/类
@Autowired
public AuthServiceImpl(
        AuthenticationManager authenticationManager,
        UserDetailsService userDetailsService,
        JwtTokenUtil jwtTokenUtil,
        UserRepository userRepository,
        RoleRepository roleRepository) {
    this.authenticationManager = authenticationManager;
    this.userDetailsService = userDetailsService;
    this.jwtTokenUtil = jwtTokenUtil;
    this.userRepository = userRepository;
    this.roleRepository = roleRepository;
}
 
开发者ID:DigAg,项目名称:digag-server,代码行数:14,代码来源:AuthServiceImpl.java

示例4: OAuth2Configuration

import org.springframework.security.authentication.AuthenticationManager; //导入依赖的package包/类
public OAuth2Configuration(ResourceLoader resourceLoader, OpenIdProviderProperties properties,
		ObjectProvider<JdbcOperations> jdbcOperations, ObjectProvider<AuthenticationManager> authenticationManager,
		ObjectProvider<HazelcastInstance> hazelcastInstance) {
	this.resourceLoader = resourceLoader;
	this.properties = properties;
	this.jdbcOperations = jdbcOperations.getObject();
	this.authenticationManager = authenticationManager.getObject();
	this.hazelcastInstance = hazelcastInstance.getObject();
}
 
开发者ID:vpavic,项目名称:simple-openid-provider,代码行数:10,代码来源:OAuth2Configuration.java

示例5: OAuth2AuthorizationServerConfig

import org.springframework.security.authentication.AuthenticationManager; //导入依赖的package包/类
public OAuth2AuthorizationServerConfig(AccessTokenConverter accessTokenConverter, ApprovalStore approvalStore, AuthenticationManager authenticationManager, OAuth2ClientService clientService, TokenEnhancer tokenEnhancer, TokenStore tokenStore) {
	this.accessTokenConverter = accessTokenConverter;
	this.approvalStore = approvalStore;
	this.authenticationManager = authenticationManager;
	this.clientService = clientService;
	this.tokenEnhancer = tokenEnhancer;
	this.tokenStore = tokenStore;
}
 
开发者ID:codenergic,项目名称:theskeleton,代码行数:9,代码来源:OAuth2AuthorizationServerConfig.java

示例6: PreauthFilter

import org.springframework.security.authentication.AuthenticationManager; //导入依赖的package包/类
public PreauthFilter(AuthenticationManager authenticationManager, AuditLogger logger) {
    super();

    this.setAuthenticationManager(authenticationManager);

    this.setAuthenticationSuccessHandler((request, response, authentication) -> logger.logEvent(new LoginEvent(Instant.now(), extractUsername(request), true)));
    this.setAuthenticationFailureHandler((request, response, exception) -> logger.logEvent(new LoginEvent(Instant.now(), extractUsername(request), false)));
}
 
开发者ID:LIBCAS,项目名称:ARCLib,代码行数:9,代码来源:PreauthFilter.java

示例7: JWTLoginFilter

import org.springframework.security.authentication.AuthenticationManager; //导入依赖的package包/类
protected JWTLoginFilter(String defaultFilterProcessesUrl,
                         TokenProvider tokenProvider,
                         JwtSecurityProperties jwtSecurityProperties,
                         AuthenticationManager authenticationManager) {
  super(new AntPathRequestMatcher(defaultFilterProcessesUrl));
  this.tokenProvider = tokenProvider;
  this.jwtSecurityProperties = jwtSecurityProperties;
  setAuthenticationManager(authenticationManager);
}
 
开发者ID:Cobrijani,项目名称:jwt-security-spring-boot-starter,代码行数:10,代码来源:JWTLoginFilter.java

示例8: getAuthenticationManager

import org.springframework.security.authentication.AuthenticationManager; //导入依赖的package包/类
@Bean(name="authenticationManagerBean")
public AuthenticationManager getAuthenticationManager(){
	return new AuthenticationManager() {
		@Override
		public Authentication authenticate(Authentication authentication) throws AuthenticationException {
            throw new UnsupportedOperationException("No authentication should be done with this AuthenticationManager");
		}
	};
}
 
开发者ID:daflockinger,项目名称:poppynotes,代码行数:10,代码来源:OpenIdConfig.java

示例9: auth

import org.springframework.security.authentication.AuthenticationManager; //导入依赖的package包/类
public static Authentication auth(AuthenticationManager authenticationManager, String userName, String password) {
	SecurityContext sc = SecurityContextHolder.getContext();
	UsernamePasswordAuthenticationToken upToken = new UsernamePasswordAuthenticationToken(userName, password);
	Authentication authentication = authenticationManager.authenticate(upToken);
	sc.setAuthentication(authentication);
	return sc.getAuthentication();
}
 
开发者ID:DataAgg,项目名称:DAFramework,代码行数:8,代码来源:SecurityHelper.java

示例10: authenticationManagerBean

import org.springframework.security.authentication.AuthenticationManager; //导入依赖的package包/类
@Override
@Bean
public AuthenticationManager authenticationManagerBean() throws Exception {
    return super.authenticationManagerBean();
}
 
开发者ID:xm-online,项目名称:xm-uaa,代码行数:6,代码来源:UaaWebSecurityConfiguration.java

示例11: AuthServerOAuth2Config

import org.springframework.security.authentication.AuthenticationManager; //导入依赖的package包/类
@Autowired
public AuthServerOAuth2Config(AuthenticationManager authenticationManager, AppConfig appConfig) {
    this.authenticationManager = authenticationManager;
    this.appConfig = appConfig;
}
 
开发者ID:dazito,项目名称:oauth2-with-jdbc,代码行数:6,代码来源:AuthServerOAuth2Config.java

示例12: UserJWTController

import org.springframework.security.authentication.AuthenticationManager; //导入依赖的package包/类
public UserJWTController(TokenProvider tokenProvider, AuthenticationManager authenticationManager) {
    this.tokenProvider = tokenProvider;
    this.authenticationManager = authenticationManager;
}
 
开发者ID:oktadeveloper,项目名称:jhipster-microservices-example,代码行数:5,代码来源:UserJWTController.java

示例13: authenticationManagerBean

import org.springframework.security.authentication.AuthenticationManager; //导入依赖的package包/类
@Bean
@Override
public AuthenticationManager authenticationManagerBean()
        throws Exception {
    return super.authenticationManagerBean();
}
 
开发者ID:PacktPublishing,项目名称:Spring-Security-Third-Edition,代码行数:7,代码来源:SecurityConfig.java

示例14: authenticationManagerBean

import org.springframework.security.authentication.AuthenticationManager; //导入依赖的package包/类
@Override
@Bean
public AuthenticationManager authenticationManagerBean() throws Exception {
	return super.authenticationManagerBean();
}
 
开发者ID:spring-projects,项目名称:spring-security-oauth2-boot,代码行数:6,代码来源:OAuth2AutoConfigurationTests.java

示例15: CustomAuthorizationServer

import org.springframework.security.authentication.AuthenticationManager; //导入依赖的package包/类
protected CustomAuthorizationServer(AuthenticationManager authenticationManager) {
	this.authenticationManager = authenticationManager;
}
 
开发者ID:spring-projects,项目名称:spring-security-oauth2-boot,代码行数:4,代码来源:OAuth2AutoConfigurationTests.java


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