message: Fix basic auth login issue
diff: @@ -2,7 +2,9 @@ package io.github.jhipster.registry.config;
  import io.github.jhipster.registry.security.AuthoritiesConstants;
  import io.github.jhipster.registry.security.oauth2.AudienceValidator;
  +import org.springframework.beans.factory.ObjectProvider;
  import org.springframework.beans.factory.annotation.Value;
  +import org.springframework.boot.autoconfigure.security.SecurityProperties;
  import org.springframework.context.annotation.Bean;
  import org.springframework.context.annotation.Profile;
  import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
  @@ -13,14 +15,19 @@ import org.springframework.security.config.annotation.web.configuration.WebSecur
  import org.springframework.security.core.GrantedAuthority;
  import org.springframework.security.core.authority.SimpleGrantedAuthority;
  import org.springframework.security.core.authority.mapping.GrantedAuthoritiesMapper;
  +import org.springframework.security.core.userdetails.User;
  +import org.springframework.security.crypto.password.PasswordEncoder;
  import org.springframework.security.oauth2.core.DelegatingOAuth2TokenValidator;
  import org.springframework.security.oauth2.core.OAuth2TokenValidator;
  import org.springframework.security.oauth2.core.oidc.OidcUserInfo;
  import org.springframework.security.oauth2.core.oidc.user.OidcUserAuthority;
  import org.springframework.security.oauth2.jwt.*;
  +import org.springframework.security.provisioning.InMemoryUserDetailsManager;
  +import org.springframework.util.StringUtils;
  import java.util.Collection;
  import java.util.HashSet;
  +import java.util.List;
  import java.util.Set;
  import static java.util.stream.Collectors.toList;
  @@ -33,6 +40,25 @@ public class OAuth2SecurityConfiguration extends WebSecurityConfigurerAdapter {
  @Value("${spring.security.oauth2.client.provider.oidc.issuer-uri}")
  private String issuerUri;
  + @Bean
  + public InMemoryUserDetailsManager inMemoryUserDetailsManager(
  + SecurityProperties properties,
  + ObjectProvider<PasswordEncoder> passwordEncoder) {
  + SecurityProperties.User user = properties.getUser();
  + List<String> roles = user.getRoles();
  + return new InMemoryUserDetailsManager(User.withUsername(user.getName())
  + .password(getOrDeducePassword(user, passwordEncoder.getIfAvailable()))
  + .roles(StringUtils.toStringArray(roles)).build());
  + }
  +
  + private String getOrDeducePassword(SecurityProperties.User user,
  + PasswordEncoder encoder) {
  + if (encoder != null) {
  + return user.getPassword();
  + }
  + return "{noop}" + user.getPassword();
  + }
  +
  @Override
  public void configure(WebSecurity web) throws Exception {
  web.ignoring()
  