1. Home
  2. Knowledge Base
  3. Configure Hubway OAuth2 plugin

Configure Hubway OAuth2 plugin

Configure the pre-built OAuth 2.0 authentication plugin module

Along with the installation of Hubway Connect you might have opted for the use of custom authentication methods. If your authentication method of choice is OAuth 2.0, you will not need to implement it from scratch, as we provide a example of its implementation through a Hubway authentication plugin, called HWAuthentication_OAuth2.
* Note that this module is optional and if you don’t have it available on your environment, reach out to our support team.

 

By default, signature verification is enabled. To disable it open the module in ServiceCenter and set the VerifySignature site property
to False. To enable it follow these steps:

  1. Open your Ping console generated in Create Ping Account
  2. Go to Applications and click on the created application, navigate to the Configuration tab

    1. Click on the pencil on the top right corner to edit the configuration

      1. Add https://example.com in the Redirect URIs field and save

    2. Expand the URLs section
  3. Paste the following path on your browser:
    {Authorization URL}?response_type=token id_token&client_id={Client ID}&redirect_uri=https://example.com&scope=openid%20profile

    * {Authorization URL} and {Client ID} are displayed in the Configuration tab of the created app.

  4. You’ll be requested to login with the Ping user created in (and might be requested to change the password)

  5. After login, copy the link from the browser, and retrieve the id_token from the path.
    Example: https://example.com/#access_token=eyJraWQiOiJ[..]kgUqDv7w&[..]&id_token=eyJraWQ[..]eoCl0VtbmY7Q

  6. Open the module HWAuthentication_OAuth2 in ServiceCenter and to include the signature verification, set the following site properties

    1. ExpectedSignatureKeyId

      1. Open and paste the id_token

      2. Copy the kid value and set the value of the site property

    2. SignatureKey

      1. In Ping open the Application and navigate to the Configuration tab and expand the URLs

      2. Copy the JWKS Endpoint and open it in a browser tab

        1. Search for the key with the same kid value as the one defined in , and set the value of this site property with the entire content of the JSon record you found
          Example:
          {
          “kty”: “RSA”, “e”: “AQAB”, “use”: “sig”, “x5t”: “TXBdKPlRe7upoxbRxLEzlGgkTN8”,
             “kid”: “d9aa0090-4317-11ee-ac7e-776c27709711”,
             “x5c”: [
          “MIIDtDCCApygAwIBAgIGAYorkL6UMA0GCSqGSIb3DQEBCwUAMIGaMQswCQYDVQQGEwJVUzEWMBQGA1UECgwNUGluZyBJZGVud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sxJmFANm5Z02Ox4zuBc1VIdrW+h5gtCKOD4g2bEo6pe+JJVr02ZNPQImRT0Vox6EaOCYmGeosZmjNu8a4c/g==” ],
             “n”: “5kTz6tX6QyofI_uu4qwuPgQJmW_ABHuYNdL3VrpPNsBrftbe7VDzaTCv9dISHRQHWDx-_7jpc8fpeWQyvd1JALrfzm-jZFApYiNDigZO-gYSm7BgOPlc5MT2WTVMcICvs3yaen0XdhVIDXfOXjFN63XruVZAzK_lRouzsITdAjnR6ARlQ_R6eqeo0mKYxiZjEB7FcpGVw_ZX8l7SkRZt8QR_-BwySPWTYQLI9sVht_cagoWSQp7yKVwEtnqqZjkqGiCtLIq_e6XJI25y3fSIGtfK-xDoyy7oMKZLrWre6D7lL_G80hdSXl-clSnnyH8boU8eDcoBkBeHg1SsCtNUtQ”
          }

  7. You can use the id_token as the bearer token when accessing a Hubway project with OAuth 2.0 authentication
    See an example of how to use a Bearer token, when consuming APIs, using Postman:

 

Next step: Configure Hubway OAuth2 Client Sample app

Was this article helpful?

Need Support?

Can't find the answer you're looking for?
Contact Support