本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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();
}
示例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;
}
示例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)));
}
示例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);
}
示例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");
}
};
}
示例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();
}
示例10: authenticationManagerBean
import org.springframework.security.authentication.AuthenticationManager; //导入依赖的package包/类
@Override
@Bean
public AuthenticationManager authenticationManagerBean() throws Exception {
return super.authenticationManagerBean();
}
示例11: AuthServerOAuth2Config
import org.springframework.security.authentication.AuthenticationManager; //导入依赖的package包/类
@Autowired
public AuthServerOAuth2Config(AuthenticationManager authenticationManager, AppConfig appConfig) {
this.authenticationManager = authenticationManager;
this.appConfig = appConfig;
}
示例12: UserJWTController
import org.springframework.security.authentication.AuthenticationManager; //导入依赖的package包/类
public UserJWTController(TokenProvider tokenProvider, AuthenticationManager authenticationManager) {
this.tokenProvider = tokenProvider;
this.authenticationManager = authenticationManager;
}
示例13: authenticationManagerBean
import org.springframework.security.authentication.AuthenticationManager; //导入依赖的package包/类
@Bean
@Override
public AuthenticationManager authenticationManagerBean()
throws Exception {
return super.authenticationManagerBean();
}
示例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