Integrating SSO with Your App
This topic describes how to integrate SSO with Java and non-Java apps.
Because SSO service is based on the OAuth protocol, any app that uses SSO must be OAuth-aware.
If you are using Java, see the Single Sign-On Service Sample Applications repository. These are sample Spring Boot apps that demonstrate how to use SSO Service libraries to configure the app for OAuth.
After binding the app to an SSO service instance, you must restart the app for the new SSO configuration to take effect.
To configure non-Java apps for OAuth, supply the following properties as environment variables to your app after the SSO service bind. You can view this information on the Next Steps page of the SSO Developer Dashboard.
- App ID, also known as OAuth Client ID
- App Secret, also known as OAuth Client Secret
- OAuth Authorization URL, the endpoint for client authorization
- OAuth Token URL, the endpoint for token retrieval
To validate the token, you must verify the following:
The token is a properly signed JSON Web Token with an appropriate public key. The key can be downloaded from the Token Verification Key endpoint specified on the Next Steps page.
The value of
audin the token matches your App ID.
The value of
The expiry time of the token,
exp, has not passed.
For PCF v2.2 and later, when making an authorization code, password, or implicit grant request, a login hint can be provided so that the end user is automatically redirected to the appropriate IDP.
An encoded JSON string containing
origin_key tied to the origin key of an
identity provider can be provided as a login hint using
login_hint in a query
For information about login hints,
see the Authorization Code Grant
in the UAA API documentation.