public HttpConfiguration httpBuilder() throws Exception {
   HttpConfiguration springSecurityFilterChain = new HttpConfiguration(authenticationManager());
   springSecurityFilterChain.setSharedObject(
       UserDetailsService.class, authenticationRegistry.userDetailsService());
   applyDefaults(springSecurityFilterChain);
   configure(springSecurityFilterChain);
   return springSecurityFilterChain;
 }
 public UserDetailsService userDetailsService() {
   return authenticationRegistry.userDetailsService();
 }
 private AuthenticationManager createAuthenticationManager() throws Exception {
   registerAuthentication(authenticationRegistry);
   return authenticationRegistry.build();
 }