Java 类org.springframework.boot.autoconfigure.security.SecurityProperties.User 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:AuthenticationManagerConfiguration.java   
@Override
public void configure(AuthenticationManagerBuilder auth) throws Exception {
    if (auth.isConfigured()) {
        return;
    }
    User user = this.securityProperties.getUser();
    if (user.isDefaultPassword()) {
        logger.info(String.format("%n%nUsing default security password: %s%n",
                user.getPassword()));
    }
    Set<String> roles = new LinkedHashSet<String>(user.getRole());
    withUser(user.getName()).password(user.getPassword())
            .roles(roles.toArray(new String[roles.size()]));
    setField(auth, "defaultUserDetailsService", getUserDetailsService());
    super.configure(auth);
}
项目:spring-boot-concourse    文件:AuthenticationManagerConfiguration.java   
@Override
public void configure(AuthenticationManagerBuilder auth) throws Exception {
    if (auth.isConfigured()) {
        return;
    }
    User user = this.securityProperties.getUser();
    if (user.isDefaultPassword()) {
        logger.info(String.format("%n%nUsing default security password: %s%n",
                user.getPassword()));
    }
    Set<String> roles = new LinkedHashSet<String>(user.getRole());
    withUser(user.getName()).password(user.getPassword())
            .roles(roles.toArray(new String[roles.size()]));
    setField(auth, "defaultUserDetailsService", getUserDetailsService());
    super.configure(auth);
}
项目:contestparser    文件:AuthenticationManagerConfiguration.java   
@Override
public void configure(AuthenticationManagerBuilder auth) throws Exception {
    if (auth.isConfigured()) {
        return;
    }
    User user = this.securityProperties.getUser();
    if (user.isDefaultPassword()) {
        logger.info("\n\nUsing default security password: " + user.getPassword()
                + "\n");
    }
    Set<String> roles = new LinkedHashSet<String>(user.getRole());
    withUser(user.getName()).password(user.getPassword())
            .roles(roles.toArray(new String[roles.size()]));
    setField(auth, "defaultUserDetailsService", getUserDetailsService());
    super.configure(auth);
}
项目:github-job-keywords    文件:UserRestController.java   
@RequestMapping(value = "/{userName}", method = RequestMethod.DELETE, produces = "application/json")
public User deleteUser(@PathVariable Long userName) {
    log.error("/user DELETE endpoint");

    return user;
}