File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
oauth-jwt/jwt-resource-server/src/test/java/com/baeldung/jwt Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ public void givenUserWithReadScope_whenGetProjectResource_thenSuccess() {
46
46
47
47
@ Test
48
48
public void givenUserWithOtherScope_whenGetProjectResource_thenForbidden () {
49
- String accessToken = obtainAccessToken ("other " );
49
+ String accessToken = obtainAccessToken ("email " );
50
50
System .out .println ("ACCESS TOKEN: " + accessToken );
51
51
52
52
// Access resources using access token
@@ -68,7 +68,8 @@ public void givenUserWithReadScope_whenGetUserInformationResource_thenSuccess()
68
68
.header (HttpHeaders .AUTHORIZATION , "Bearer " + accessToken )
69
69
.get (userInfoResourceUrl );
70
70
System .out .println (response .asString ());
71
- assertThat (response .as (Map .class )).containsEntry ("user_name" , "john@test.com" );
71
+ assertThat (response .as (Map .class )).containsEntry ("user_name" , "john@test.com" )
72
+ .containsEntry ("organization" , "BAELDUNG" );
72
73
}
73
74
74
75
@ Test
You can’t perform that action at this time.
0 commit comments