title: How can I add users to the inMemoryAuthentication builder after it has been built?
body: <p>I have managed to load all the users into the AuthenticationManagerBuilder during the initial load of the application, but I have a requirement to add users post-startup.</p>
  
  <p>Startup:</p>
  
  <pre><code>public class WebSecurityConfig extends WebSecurityConfigurerAdapter
  
  ...
  
  auth.inMemoryAuthentication().withUser(email).password(password).roles(roles.toArray(new String[roles.size()])).and().passwordEncoder(encoder());
  </code></pre>
  
  <p>This works great for a point in time, but I have a use case where users can be added while the application is running.</p>
  
  <p>By which method can I do this post-startup (via controller/service)?  I'm thinking it might be the <code>InMemoryUserDetailsManager</code> (it contains the <code>createUser()</code> method) but I'm not sure how to reference or configure it.</p>