コード例 #1
0
 @Autowired
 protected void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
   auth.userDetailsService(userDetailsService);
   //                .inMemoryAuthentication()
   //                .withUser("user")
   //                .password("password")
   //                .roles("USER","ADMIN");
 }
コード例 #2
0
  @Override
  protected void configure(AuthenticationManagerBuilder auth) throws Exception {

    // for "refresh_token" to work a real UserDetailsService is necessary
    //        auth.inMemoryAuthentication()
    //                .withUser("donald").password("d8ck").roles("USER");

    auth.userDetailsService(userDetailsService);
  }
コード例 #3
0
 @Autowired
 public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
   BCryptPasswordEncoder passwordEncoder = passwordEncoder();
   auth.userDetailsService(userDetailsService).passwordEncoder(passwordEncoder);
   /*auth.jdbcAuthentication().dataSource(dataSource)
                   .usersByUsernameQuery("select name, '1', 1 from users where name = ?")
                   .authoritiesByUsernameQuery(
     "select users.name, authorities.name from users join user_authorities on users.id = user_authorities.user_id join authorities on user_authorities.authority_id = authorities.id where users.name = ?");
   */
 }
コード例 #4
0
ファイル: SecurityConfig.java プロジェクト: jvwong/CMS
  /*
   * User-details services
   */
  @Autowired
  public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
    auth
        // <T extends UserDetailsService>
        // DaoAuthenticationConfigurer<AuthenticationManagerBuilder,T>
        // userDetailsService(T userDetailsService)
        .userDetailsService(userDetailsService)
        .passwordEncoder(passwordEncoder);

    // System.out.println(passwordEncoder.encode("asdasdasd"));
  }
コード例 #5
0
 @Override
 protected void configure(AuthenticationManagerBuilder auth) throws Exception {
   auth.inMemoryAuthentication()
       .withUser("admin")
       .password("admin")
       .authorities(AuthorityUtils.createAuthorityList(Role.ROLE_ADMIN.toString()))
       .and()
       .withUser("user")
       .password("user")
       .authorities(AuthorityUtils.createAuthorityList(Role.ROLE_USER.toString()));
   auth.userDetailsService(userDetailsService()).passwordEncoder(passwordEncoder());
 }
コード例 #6
0
 @Override
 protected void configure(AuthenticationManagerBuilder auth) throws Exception {
   auth.userDetailsService(userDetailsService);
 }
コード例 #7
0
 @Override
 public void init(AuthenticationManagerBuilder auth) throws Exception {
   auth.userDetailsService(rulerUserDetailService);
 }
コード例 #8
0
 @Autowired
 public void configureGlobal(
     @SuppressWarnings("SpringJavaAutowiringInspection") AuthenticationManagerBuilder builder)
     throws Exception {
   builder.userDetailsService(userDetailsService).passwordEncoder(shaPasswordEncoder());
 }
コード例 #9
0
    @Autowired
    protected void registerAuthentication(final AuthenticationManagerBuilder auth)
        throws Exception {

      auth.userDetailsService(userDetailsService);
    }
コード例 #10
0
ファイル: SecurityConfig.java プロジェクト: imxood/app
 // 自己实现DetailsService,完成自定义认证
 @Override
 protected void configure(AuthenticationManagerBuilder auth) throws Exception {
   logger.info("进入自定义UserDetailsService-->config");
   auth.userDetailsService(userService());
 }
コード例 #11
0
 @Override
 public void configure(AuthenticationManagerBuilder auth) throws Exception {
   auth.userDetailsService(userDetailsService).passwordEncoder(User.PASSWORD_ENCODER);
 }
コード例 #12
0
 @Autowired
 public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
   auth.userDetailsService(mySQLUserDetailsService);
 }
コード例 #13
0
ファイル: SecurityConfig.java プロジェクト: cssru/cncompanies
 // регистрируем нашу реализацию UserDetailsService
 // а также PasswordEncoder
 @Autowired
 public void registerGlobalAuthentication(AuthenticationManagerBuilder auth) throws Exception {
   auth.userDetailsService(userDetailsService).passwordEncoder(getPasswordEncoder());
 }
コード例 #14
0
 @Autowired
 public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
   auth.userDetailsService(userDetailsService).passwordEncoder(passwordEncoder());
 }
コード例 #15
0
 private void configureUserDetailsService(AuthenticationManagerBuilder auth) throws Exception {
   // @formatter:off
   auth.userDetailsService(userDetailsService()).passwordEncoder(passwordEncoder());
   // @formatter:on
 }
コード例 #16
0
 @Autowired
 public void configureGlobalSecurity(AuthenticationManagerBuilder auth) throws Exception {
   auth.userDetailsService(userDetailsService);
   auth.authenticationProvider(authenticationProvider());
 }
コード例 #17
0
 @Autowired
 public void configAuthBuilder(AuthenticationManagerBuilder builder) throws Exception {
   builder.userDetailsService(userDetailService);
 }
コード例 #18
0
 @Autowired
 public void configAuthentication(AuthenticationManagerBuilder auth) throws Exception {
   auth.userDetailsService(userDetailsService);
 }
コード例 #19
0
ファイル: WebSecurityConfig.java プロジェクト: wcislo/acadart
 @Override
 protected void configure(AuthenticationManagerBuilder auth) throws Exception {
   auth.userDetailsService(accountServiceImpl).passwordEncoder(EncodingUtils.passwordEncoder());
 }
コード例 #20
0
ファイル: AppSecurityConfig.java プロジェクト: jannvain/rank
 @Override
 protected void configure(AuthenticationManagerBuilder auth) throws Exception {
   auth.userDetailsService(userDetailsService).passwordEncoder(new BCryptPasswordEncoder());
 }
コード例 #21
0
 @Override
 protected void configure(AuthenticationManagerBuilder auth) throws Exception {
   auth.userDetailsService(new UserDetailServiceImpl(userRepository));
 }
コード例 #22
0
 @Override
 protected void configure(AuthenticationManagerBuilder authManagerBuilder) throws Exception {
   authManagerBuilder.userDetailsService(new CustomUserDetailsService());
 }
コード例 #23
0
ファイル: SecurityConfig.java プロジェクト: signal2564/sjsp
 @Override
 protected void registerAuthentication(AuthenticationManagerBuilder auth) throws Exception {
   PasswordEncoder encoder = encoder();
   auth.userDetailsService(userService).passwordEncoder(encoder);
 }
 @Autowired
 public void configureGlobal(
     AuthenticationManagerBuilder auth, CustomUserDetailsService customUserDetailsService)
     throws Exception {
   auth.userDetailsService(customUserDetailsService).passwordEncoder(new BCryptPasswordEncoder());
 }
コード例 #25
0
 @Autowired
 public void configureGlobal(final AuthenticationManagerBuilder auth) throws Exception {
   auth.userDetailsService(userDetailsManager());
 }