Skip to content

Commit f0a76aa

Browse files
committed
Merge branch 'develop'
2 parents 2290ffc + fc451d0 commit f0a76aa

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

Diff for: README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This repo holds separate sample applications for each one of the four OAuth 2.0 grant types supported by the Pivotal Single Sign-On Service. The GRANT_TYPE environment variable is already set to the relevant value mentioned below for each sample application. Each grant type maps to an Application Type as seen in the Pivotal Single Sign-On Service Dashboard.
44

5-
The latest version of this repository supports Spring Boot 1.5. The last version to support Spring Boot 1.3 is tagged at [spring-boot/1.3](https://github.com/pivotal-cf/identity-sample-apps/releases/tag/spring-boot%2F1.3).
5+
The latest version of this repository supports Spring Boot 1.5.5+ and requires the SSO connector 2.1.1+. The last version to support Spring Boot 1.3 is tagged at [spring-boot/1.3](https://github.com/pivotal-cf/identity-sample-apps/releases/tag/spring-boot%2F1.3).
66

77
Application Type | Grant Type
88
------------- | -------------
@@ -37,7 +37,7 @@ As an alternative to Steps 1 and 2 above, you can also quickly deploy the authco
3737

3838
1. First, make sure you created a [Service Plan](https://docs.pivotal.io/p-identity/manage-service-plans.html) for your Org as well as a [Service Instance](https://docs.pivotal.io/p-identity/manage-service-instances.html) named `sample-instance` for your Space, and login via CF CLI as a Space Developer into the required Org and Space.
3939

40-
2. Replace `manifest.yml` with `manifest.yml.quick-start` for the *authcode* and *resource-server* projects and update the `RESOURCE_URL` and `AUTH_URL` values in the manifest with your plan and domain values.
40+
2. Replace `manifest.yml` with `manifest.yml.quick-start` for the *authcode* and *resource-server* projects and update the `RESOURCE_URL` and `AUTH_SERVER` values in the manifest with your plan and domain values.
4141

4242
3. Build (`./gradlew build`) and push (`cf push`) both the *authcode* and *resource-server* projects to your Space where you are logged in as a Space Developer.
4343

@@ -51,7 +51,7 @@ The sample application and resource server be available immediately bound to the
5151
The resource server needs to know the Auth Server (or UAA) location in order to retrieve the token key to validate the tokens.
5252
Change `AUTH_SERVER` in `manifest.yml` to point to your UAA instance.
5353

54-
NOTE: Beginning with our Spring Boot 1.5 version of the identity sample applications, bind the Resource Server to the Singl†e Sign-On Service instead of providing the AUTH_SERVER value.
54+
cf set-env <RESOURCE_SERVER_APP_NAME> AUTH_SERVER <AUTH_SERVER_LOCATION>
5555

5656
For example, for a given SSO service plan/UAA identity zone, the location would be `https://subdomain.login.my-domain.org`
5757

@@ -62,6 +62,8 @@ It has three API endpoints:
6262

6363
To push the app, follow steps [1](#step-1) and [2](#step-2) of the previous section.
6464

65+
Beginning with our Spring Boot 1.5 version of the identity sample applications, you may also bind the Resource Server to the Single Sign-On Service instead of providing the AUTH_SERVER value.
66+
6567
## Setting up Authcode Sample App to use Resource Server
6668

6769
Currently, only the authcode sample app uses the resource server, but the other grant types should be similar.

Diff for: resource-server/src/main/resources/application.yml

+11-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@ security:
1212
basic:
1313
enabled: false
1414
require_ssl: false
15-
15+
oauth2:
16+
resource:
17+
preferTokenInfo: false
18+
userInfoUri: ${AUTH_SERVER}/userinfo
19+
# Token Info endpoint is used for online token validation. If Token Keys endpoint (jwk.key-set-uri) is configured, this value is not used.
20+
tokenInfoUri: ${AUTH_SERVER}/check_token
21+
# Token Keys endpoint is used for offline token validation. This value must be deleted if online token validation is desired.
22+
jwk:
23+
key-set-uri: ${AUTH_SERVER}/token_keys
24+
# This value is used by the SSO connector and will be overwritten along with other Spring Boot OAuth2 values if bound the the SSO service.
25+
ssoServiceUrl: ${AUTH_SERVER}
1626
logging.level:
1727
org.springframework.security: DEBUG

0 commit comments

Comments
 (0)