This commit is contained in:
Phillip Webb
2015-11-03 20:36:20 -08:00
parent fd1cbed51c
commit 6c2ea4648f
32 changed files with 190 additions and 141 deletions

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package sample.secure.oauth2;
package sample.secure.oauth2.resource;
import java.util.Date;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package sample.secure.oauth2;
package sample.secure.oauth2.resource;
import org.springframework.data.repository.CrudRepository;

View File

@@ -13,7 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package sample.secure.oauth2;
package sample.secure.oauth2.resource;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@@ -23,8 +24,9 @@ import org.springframework.security.oauth2.config.annotation.web.configuration.R
@SpringBootApplication
@EnableResourceServer
public class SampleSecureOAuth2ResourceApplication extends ResourceServerConfigurerAdapter {
public class SampleSecureOAuth2ResourceApplication
extends ResourceServerConfigurerAdapter {
@Override
public void configure(HttpSecurity http) throws Exception {
http.antMatcher("/flights/**").authorizeRequests().anyRequest().authenticated();