Skip to content

xCJPECKOVERx/spring-oauth2-test

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

###Minimum sample project for spring-boot#5096 issue

How to reproduce an error:

  1. Start account-service and auth-service applications
  2. Request oauth token with user credentials from browser client:

curl -X POST --user browser: http://localhost:5000/uaa/oauth/token --data "scope=ui&username=name&password=password&grant_type=password"

  1. Use received token to request account-service controller:

curl -X GET http://localhost:6000/ -H "Authorization: Bearer #token#"

You will get Access is denied error, because this controller protected with @PreAuthorize("#oauth2.hasScope('ui')") annotation, which has unexpected behavior at the moment.

-- UPD: Custom implementation of ResourceServerTokenServices solves the problem. Have a look at CustomUserInfoTokenServices in account-service.

About

Simple project for spring-boot#5096 issue

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 37.1%
  • Shell 36.8%
  • Batchfile 26.1%