Skip to end of metadata
Go to start of metadata

This section demonstrates the WSO2 Identity Servers OpenID Connect Basic Client Profile Implementation with the WSO2 OAuth2 Playground sample. You can download the WSO2 Identity Server from here.

Setting up WSO2 OAuth2.0 Playground sample:

  1. Download the Playground sample from here.
  2. Deploy the webapp in Apache Tomcat.

Registering the Playground Application:

  1. Start the WSO2 Identity Server 4.5.0 and log in.
  2. Go to Main > Manage > OAuth > Register New Application
  3. Register the playground application as an OAuth 2.0 application with the following configs.

    Application Name - playground 
    Callback URL - http://localhost:8080/playground/oauth2client
    Allowed Grant Types = Code, Implicit 
  4. After successful registration the application is given a Client Id and a Client Secret.

Completing the user profile:

  1. Create a user.
  2. Log in as the user you created and go to My Profiles.
  3. Update the profile.

    You can also do this at Configure > Users and Roles > Users, then select the user and update the profile.

Running the application:

  1. Visit the URL http://localhost:8080/playground/oauth2.jsp to start the application.
  2. Enter the following details and click Authorize.

    Authorization Grant Type: Authorization Code
    Client ID: (the client id received at the application registration)
    Scope: openid
    Callback URL: http://localhost:8080/playground/oauth2client
    Authorize Endpoint: https://localhost:9443/oauth2/authorize

  3. Click on Continue.
  4. Log in with the created user.
  5. Click Approve Always to consent to this action.
  6. Provide the following and click on Get Access Token.

    Callback URL: http://localhost:8080/playground/oauth2client
    Access Token Endpoint: https://localhost:9443/oauth2/token
    Client Secret: (client secret received at the application registration)

  7. At this point the application receives the ID Token along with the Access Token. The ID Token is used to login the user to the application. Now you can see the logged in user. 
  8. Enter the UserInfo Endpoint URL https://localhost:9443/oauth2/userinfo?schema=openid and click on Get UserInfo.
  9. Now you should be able to see the user information.
  10. You can try different consent values {none, login and consent}.

  • No labels