일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
- 리소스 서버
- JsonSerializer
- 스프링부트
- 백트래킹
- HATEOAS
- OAuth2
- webjar
- 정적 리소스
- cors
- 스프링 부트
- 다익스트라
- application.properties
- Spring Security
- JPA
- 알고리즘
- 브루트포스
- Application Runner
- EnableAutoConfiguration
- 외부설정
- HttpMessageConverters
- AuthenticationPrincipal
- @ConfigurationProperties
- 리소스핸들러
- rest api
- Application Argument
- 백준
- 백기선
- Application Event
- WebApplication Type
- @Profile
- Today
- Total
목록전체 글 (114)
아카이브
민감정보는 출력하지 않도록 JsonSerializer를 상속하자. Account의 id만 보내주도록 설정하기 @Override public void serialize(Account account, JsonGenerator gen, SerializerProvider serializers) throws IOException { gen.writeStartObject(); gen.writeNumberField("id", account.getId()); gen.writeEndObject(); } Event의 manager field에 적용하기 @JsonSerialize(using = AccountSerializer.class) // Event를 serialize 하는 경우, manager field에 대해서는 A..
SecurityContext 자바 ThreadLocal 기반 구현으로 인증 정보를 담고 있다. ※ ThreadLocal ? 오직 한 Thread에 의해서 read/write 가능한 variable을 생성할 수 있도록 하는 것(Thread Local Variable) 인증 정보를 꺼내는 방법 Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); // Anonymous인 경우 principal = "anonymousUser" 로 String 이다. @AuthenticationPrincipal spring.security.User user 인증을 안했다 ? null : username과 authorities..
리소스 서버 OAuth2 인증 서버와 연동해서 사용한다. 리소스 인증 서버는 리소스를 제공하는 서버와 같이 두고, OAuth2 인증 서버는 따로 분리하는 게 맞다. 리소스에 대한 요청이 들어오면, OAuth2 서버에 access_token이 존재하는지 확인하고 없으면 접근을 제한한다. ResourceServer 설정 @EnableResourceServer extends ResourceServerConfigurerAdapter configure(ResourceServerSecurityConfigurer resources) resource_id configure(HttpSecurity http) anonymous GET /api/** : permit all POST /api/**: authenticated ..