This documentation is for WSO2 Identity Server 5.1.0 . View documentation for the latest release.

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Configuring OAuth/OpenID Connect

Configure OAuthTo use this sample, you first need to configure OAuth/OpenID Connect for a service provider as described in here.

Configuring the Playground2 web application

To obtain and configure the single sign-on sample, follow the steps below.

  1. You can check out the repository of the OAuth 2.0 sample from GitHub. Follow the instructions here to checkout the folder. We refer <SAMPLE_HOME> as the modules/samples folder inside the folder where the product-is repository is checked out.

    Code Block
    https://github.com/wso2/product-is/tree/v5.1.0/modules/samples/oauth2/playground2
  2. In your command line, navigate to <SAMPLE_HOME>/oauth2/playground2 in the folder you checked out and build the sample using the following command. You must have Apache Maven installed to do this (see Installation Prerequisites for the appropriate version to use).

    Code Block
    mvn clean install
  3. After successfully building the sample, a .war file named playground2 can be found inside the <SAMPLE_HOME>/oauth2/playground2/target folder. Deploy this sample web app on a web container. To do this, use the Apache Tomcat server.

    Note

    Since this sample is written based on Servlet 3.0 it needs to be deployed on Tomcat 7.x.

    Use the following steps to deploy the web app in the web container:

    1. Stop the Apache Tomcat server if it is already running.
    2. Copy the playground2 file to the <TOMCAT_HOME>/webapps folder.
    3. Start the Apache Tomcat server.

See Configuring Inbound Authentication for a Service Provider for more information on how to do this. 

Anchor
PlaygroundSetup
PlaygroundSetup

Configuring the Playground2 web application

Include Page
Setting Up the Sample Webapp
Setting Up the Sample Webapp

OAuth 2.0 Grant Types with WSO2 OAuth2 Playground

Expand
titleOAuth 2.0 Authorization code Grant Type with WSO2 OAuth2 Playground

Include Page
OAuth 2.0 Authorization code Grant Type with WSO2 Identity Server and WSO2 OAuth2 PlaygroundOAuth 2.0 Authorization code Grant Type with WSO2 Identity Server and WSO2 OAuth2 PlaygroundTry Authorization Code Grant
Try Authorization Code Grant

Expand
titleOAuth 2.0 Implicit Grant Type with WSO2 OAuth2 Playground

Include Page
Try Implicit Grant
Try Implicit Grant

Implicit WSO2 Identity Server and
Expand
titleOAuth 2.0
Password Grant Type with
WSO2 OAuth2 Playground

Include Page
Try Password Grant
Try Password Grant

Implicit Identity Server and WSO2
Expand
titleOAuth 2.0
Client Credentials Grant Type with WSO2
OAuth2 Playground

Include Page
Try Client Credentials Grant
Try Client Credentials Grant