|
1 | 1 | /*
|
2 |
| - * Copyright 2002-2019 the original author or authors. |
| 2 | + * Copyright 2002-2020 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
41 | 41 | import org.springframework.beans.factory.annotation.Autowired;
|
42 | 42 | import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
|
43 | 43 | import org.springframework.boot.test.context.SpringBootTest;
|
44 |
| -import org.springframework.context.annotation.Bean; |
45 | 44 | import org.springframework.http.HttpStatus;
|
46 | 45 | import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
47 | 46 | import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
|
53 | 52 | import org.springframework.security.oauth2.client.registration.ClientRegistrationRepository;
|
54 | 53 | import org.springframework.security.oauth2.client.userinfo.OAuth2UserRequest;
|
55 | 54 | import org.springframework.security.oauth2.client.userinfo.OAuth2UserService;
|
56 |
| -import org.springframework.security.oauth2.client.web.HttpSessionOAuth2AuthorizedClientRepository; |
57 | 55 | import org.springframework.security.oauth2.client.web.OAuth2AuthorizationRequestRedirectFilter;
|
58 |
| -import org.springframework.security.oauth2.client.web.OAuth2AuthorizedClientRepository; |
59 | 56 | import org.springframework.security.oauth2.client.web.OAuth2LoginAuthenticationFilter;
|
60 | 57 | import org.springframework.security.oauth2.core.OAuth2AccessToken;
|
61 | 58 | import org.springframework.security.oauth2.core.endpoint.OAuth2AccessTokenResponse;
|
@@ -381,10 +378,5 @@ private OAuth2UserService<OAuth2UserRequest, OAuth2User> mockUserService() {
|
381 | 378 | when(userService.loadUser(any())).thenReturn(user);
|
382 | 379 | return userService;
|
383 | 380 | }
|
384 |
| - |
385 |
| - @Bean |
386 |
| - OAuth2AuthorizedClientRepository authorizedClientRepository() { |
387 |
| - return new HttpSessionOAuth2AuthorizedClientRepository(); |
388 |
| - } |
389 | 381 | }
|
390 | 382 | }
|
0 commit comments