當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。