@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); }
@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); }
@RequestMapping(value = "/{userName}", method = RequestMethod.DELETE, produces = "application/json") public User deleteUser(@PathVariable Long userName) { log.error("/user DELETE endpoint"); return user; }