Skip to content

Umpire-Wicket integration: Implementation details.

Umpire - settings

client settings in umpire credentials

<client name>:
  client_id: FFFFFFFF-0000-0000-0000-FFFFFFFFFFFF
  ...
  users:
    provider: **wicket_users**
    data_provider: **wicket_users_data**
  wicket:
    x_api_key: <X API key>
    url: <Wicket API url>
    images_url: <Images url>
    application_id: <application_id>
  ...

For proper work, the API client (web, mobile...) should pass the Wicket JWT token in the header as User-Authorization, e.g.

Header['User-Authorization'] = "Bearer ..."

Umpire - implementation description

New user scenario:


  1. A new user is created in Umpire and assigned external_id, where external_id corresponds to custom:user_id from the token, and as provider is assigned wicket_user in DB it looks like:
    { 
      "id" => "16334",
      "resource_type" => "User",
      "resource_id" => "4263",
      "external_id" => "b8d63ad09e035303710f6636f0d2dc5f594581de6f4bec2e8a",
      "provider" => "wicket_users"
    }
    
  2. Then the data is synced with Wicket
sequenceDiagram
  autonumber
  Umpire->>Wicket: /vendor/user-subs/get 
  Wicket-->>Umpire: `aplication_user_sub`
  Umpire->>Wicket: /user-data/read
  Wicket-->>Umpire: <user data>

Diagram description

Umpire makes a request to Wicket to fetch user IDs by sending custom:user_id in the query.

Wicket returns application_user_sub.

To User is assigned additional external_id, where external_id corresponds to application_user_sub from the response, and as provider is assigned wicket_user_data in DB it looks like:

{ 
  "id" => "16334",
  "resource_type" => "User",
  "resource_id" => "4263",
  "external_id" => "3d9d74ce56b285aaafa800d883d44fe6a1efc709566dea8856",
  "provider"=> "wicket_users_data"
}

Umpire makes a request to Wicket to fetch user data by sending application_user_sub in the query.

Wicket returns user data.

User is updated with the information from the Wicket.


Existing user scenario:


  1. The user is retrieved from the Umpire DB based on the custom:user_id from the token.

  2. Then the data is synced with Wicket

sequenceDiagram
  autonumber
  Umpire->>Wicket: /user-data/read
  Wicket-->>Umpire: <user data>

Diagram description

Umpire makes a request to Wicket to fetch user data by sending external_id from provider wicket_users_data.

Wicket returns user data.

User is updated with the information from the Wicket.