diff --git a/samples/boot/oauth2authorizationserver/README.adoc b/samples/boot/oauth2authorizationserver/README.adoc index 34e21b744f..fc6c82d45a 100644 --- a/samples/boot/oauth2authorizationserver/README.adoc +++ b/samples/boot/oauth2authorizationserver/README.adoc @@ -17,7 +17,7 @@ Or import the project into your IDE and run `OAuth2AuthorizationServerApplicatio Once it is up, this request asks for a token with the "message:read" scope: ```bash -curl reader:secret@localhost:8081/oauth/token -d grant_type=password -d username=user -d password=password +curl reader:secret@localhost:8081/oauth/token -d grant_type=password -d username=subject -d password=password ``` Which will respond with something like: @@ -35,5 +35,5 @@ Which will respond with something like: You can also so the same with the `writer` client: ```bash -curl writer:secret@localhost:8081/oauth/token -d grant_type=password -d username=user -d password=$PASSWORD +curl writer:secret@localhost:8081/oauth/token -d grant_type=password -d username=subject -d password=password ``` diff --git a/samples/boot/oauth2authorizationserver/src/main/java/sample/JwkSetConfiguration.java b/samples/boot/oauth2authorizationserver/src/main/java/sample/JwkSetConfiguration.java index 73e59f5619..fb0e317ca7 100644 --- a/samples/boot/oauth2authorizationserver/src/main/java/sample/JwkSetConfiguration.java +++ b/samples/boot/oauth2authorizationserver/src/main/java/sample/JwkSetConfiguration.java @@ -146,7 +146,7 @@ class UserConfig extends WebSecurityConfigurerAdapter { public UserDetailsService userDetailsService() { return new InMemoryUserDetailsManager( User.withDefaultPasswordEncoder() - .username("user") + .username("subject") .password("password") .roles("USER") .build()); diff --git a/samples/boot/oauth2authorizationserver/src/test/java/sample/OAuth2AuthorizationServerApplicationTests.java b/samples/boot/oauth2authorizationserver/src/test/java/sample/OAuth2AuthorizationServerApplicationTests.java index 6a663423b9..70d9deb2d5 100644 --- a/samples/boot/oauth2authorizationserver/src/test/java/sample/OAuth2AuthorizationServerApplicationTests.java +++ b/samples/boot/oauth2authorizationserver/src/test/java/sample/OAuth2AuthorizationServerApplicationTests.java @@ -47,7 +47,7 @@ public class OAuth2AuthorizationServerApplicationTests { this.mvc.perform(post("/oauth/token") .param("grant_type", "password") - .param("username", "user") + .param("username", "subject") .param("password", "password") .header("Authorization", "Basic cmVhZGVyOnNlY3JldA==")) .andExpect(status().isOk());