Configure OAuth/OpenID and SAML SSO
See the Configuring Inbound Authentication for a Service Provider topic, to configure the OAuth/OpenID Connect service provider.
- See the Configuring Single Sign-On topic to configure single sign-on with the Travelocity sample.
Navigate to Main>Service Providers>List and click Edit to modify the service provider you just created. Modify the following fields of the SAML configuration and click Update.
Check the checkbox for the Enable Audience Restriction and Enable Recipient Validation fields and enter the following values:
Audience : https://localhost:9443/oauth2/token
Recipient : https://localhost:9443/oauth2/token
travelocity.propertiesfile found in the
<TOMCAT_HOME>/webapps/travelocity.com/WEB-INF/classesfolder and edit the following configurations.
EnableOAuth2SAML2Grant=true OAuth2.ClientId=(enter the client id received at the application registration) OAuth2.ClientSecret= (enter the client secret received at the application registration)
Running the sample
- Access the following URL:
http://localhost:8080/travelocity.com. You will be directed to the following page.
- Click Click here to login with SAML from Identity Server. You will be redirected to the Identity Server for authentication.
- Enter the username and password and click Sign In.
- Click Request OAuth2 Access Token to receive the access token.
- You will receive an access token as seen in the screen below.