Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
9f1ed197
Commit
9f1ed197
authored
Oct 03, 2017
by
Madhura Bhave
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update sample with placeholders for oauth client
parent
9692abba
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
+7
-6
OAuth2ClientPropertiesRegistrationAdapterTests.java
...lient/OAuth2ClientPropertiesRegistrationAdapterTests.java
+1
-1
application.yml
...t-sample-oauth2-client/src/main/resources/application.yml
+4
-4
SampleOAuth2ClientApplicationTests.java
...ple/oauth2/client/SampleOAuth2ClientApplicationTests.java
+2
-1
No files found.
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/client/OAuth2ClientPropertiesRegistrationAdapterTests.java
View file @
9f1ed197
...
...
@@ -110,7 +110,7 @@ public class OAuth2ClientPropertiesRegistrationAdapterTests {
assertThat
(
adapted
.
getAuthorizationGrantType
()).
isEqualTo
(
org
.
springframework
.
security
.
oauth2
.
core
.
AuthorizationGrantType
.
AUTHORIZATION_CODE
);
assertThat
(
adapted
.
getRedirectUri
()).
isEqualTo
(
"{scheme}://{serverName}:{serverPort}{contextPath}/oauth2/authorize/code/{
clientAlias
}"
);
"{scheme}://{serverName}:{serverPort}{contextPath}/oauth2/authorize/code/{
registrationId
}"
);
assertThat
(
adapted
.
getScope
()).
containsExactly
(
"openid"
,
"profile"
,
"email"
,
"address"
,
"phone"
);
assertThat
(
adapted
.
getClientName
()).
isEqualTo
(
"Google"
);
...
...
spring-boot-samples/spring-boot-sample-oauth2-client/src/main/resources/application.yml
View file @
9f1ed197
...
...
@@ -4,15 +4,15 @@ spring:
client
:
registration
:
github-client-1
:
client-id
:
1b4c6c2d23a2dbec8959
client-secret
:
8bdb4047d98f37e1c6aeba9ffd2017bc31682e1b
client-id
:
${APP-CLIENT-ID}
client-secret
:
${APP-CLIENT-SECRET}
client-name
:
Github user
provider
:
github
scope
:
user
redirect_uri
:
http://localhost:8080/oauth2/authorize/code/github
github-client-2
:
client-id
:
1b4c6c2d23a2dbec8959
client-secret
:
8bdb4047d98f37e1c6aeba9ffd2017bc31682e1b
client-id
:
${APP-CLIENT-ID}
client-secret
:
${APP-CLIENT-SECRET}
client-name
:
Github email
provider
:
github
scope
:
user:email
...
...
spring-boot-samples/spring-boot-sample-oauth2-client/src/test/main/java/sample/oauth2/client/SampleOAuth2ClientApplicationTests.java
View file @
9f1ed197
...
...
@@ -22,7 +22,8 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Madhura Bhave
*/
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
(
webEnvironment
=
SpringBootTest
.
WebEnvironment
.
RANDOM_PORT
)
@SpringBootTest
(
webEnvironment
=
SpringBootTest
.
WebEnvironment
.
RANDOM_PORT
,
properties
=
{
"APP-CLIENT-ID=my-client-id"
,
"APP-CLIENT-SECRET=my-client-secret"
})
@DirtiesContext
public
class
SampleOAuth2ClientApplicationTests
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment