728x90
@Data
public class CustomUser implements UserDetails {
  private String username;
  private String password;
  private boolean isEnabled;
  private boolean isAccountNonExpired;
  private boolean isAccountNonLocked;
  private boolean isCredentialsNonExpired;
  private Collection<? extends GrantedAuthority> authorities;
}


내저장소 바로가기 luxury515

'Springboot3.0' 카테고리의 다른 글

[Interface]`UserDetailsService`  (0) 2023.04.16
Springboot Security  (0) 2023.04.16
728x90
@EnableWebSecurity
@Configuration
@AllArgsConstructor
public class SecurityConfig {

  private final CustomUserServiceImp customUserServiceImp;
  @Bean
  public BCryptPasswordEncoder passwordEncoder() {
    return new BCryptPasswordEncoder();
  }

  @Bean
  public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
    http.authorizeHttpRequests(
            (auth) ->
                auth.antMatchers("/user/**", "/auth/**").permitAll().anyRequest().authenticated())
        .httpBasic(withDefaults());
    http.headers()
            .frameOptions().sameOrigin();
    http.userDetailsService(customUserServiceImp);
    return http.build();
  }

  @Bean
  public WebSecurityCustomizer webSecurityCustomizer() {
    return (web -> web.ignoring().antMatchers("/images/**", "/js/**", "/webjars/**"));
  }
}


내저장소 바로가기 luxury515

'Springboot3.0' 카테고리의 다른 글

[Interface]`UserDetailsService`  (0) 2023.04.16
[Interface]`UserDetails` 구현  (0) 2023.04.16
728x90

vscode 에서

cmd + shfit + p 명령후 install

vim ~/.zshrc

export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"


내저장소 바로가기 luxury515

728x90

git -c color.branch=false -c color.diff=false -c color.status=false -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v --tags origin refs/heads/main:refs/heads/main Pushing to https://github.com/luxury515/pnsn_eis_backend.git remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead. remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information. fatal: Authentication failed for 'https://github.com/luxury515/pnsn_eis_backend.git/' Pushing to https://github.com/luxury515/pnsn_eis_backend.git remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead. remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information. fatal: Authentication failed for 'https://github.com/luxury515/pnsn_eis_backend.git/' Pushing to https://github.com/luxury515/pnsn_eis_backend.git remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead. remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information. fatal: Authentication failed for 'https://github.com/luxury515/pnsn_eis_backend.git/' Pushing to https://github.com/luxury515/pnsn_eis_backend.git remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead. remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information. fatal: Authentication failed for 'https://github.com/luxury515/pnsn_eis_backend.git/' Completed with errors, see above


내저장소 바로가기 luxury515

'Dev-Tools > git' 카테고리의 다른 글

SourceTree 키 체인 확인창뜰때  (0) 2023.04.14
git install  (0) 2023.04.14
ssh key 쌍 생성  (0) 2023.04.14
git 현재 로컬프로젝트 원격저장소 push  (0) 2023.04.14
git 원격저장소 생성 & local 저장소 추가  (0) 2023.04.13

+ Recent posts