Versions Compared

Key

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

...

As mentioned above, Gini Pay API supports different authentication flows, depending on the use case. The API differentiates between anonymous and derived users. Client credentials (that you received when you registered your application) support either derived or anonymous user flows. Make sure to follow our security guidelines on how to secure your data.

  • Anonymous users are identified by username and password. You create them explicitly for your untrusted devices

  • Derived users are identified by their username only, specified by X-User-Identifier header. The value is up to you, usually a stable hash of your internal user identifier. Derived A derived user is automatically created if it doesn't exist already. It is unique for the client.

There are currently 4 different authentication flows possible with our API.

...

Communicate with Gini Pay API using client credentials (basic authentication) from a trusted device e.g. that is your trusted backend. Derived A derived user is automatically created if it doesn't exist already.

...

To communicate with Gini Pay API from untrusted devices, you need to acquire a token from Gini Pay API for the user and hand it over to the untrusted device. User The user is derived/created from X-User-Identifier header. The value is up to you, usually a stable hash of your internal user identifier.

...

Communication from both trusted and untrusted devices using a derived user

When your you communicate with our API from a trusted device using client credentials (option 1), a derived user is automatically created for a given X-User-Identifier when it's specified for the first time. From then on, the derived user stays fixed for this client id ID and X-User-Identifier. You can also acquire an access token for this user so it can be used by an untrusted device. This scenario is valid when you have both trusted and untrusted devices communicate communicating with our API and you don't want client credentials stored on an untrusted device.

...

This is the only flow that requires a communication with two APIs: the Pay API and the User Center API. This flow is done in 4 steps:

...

Access tokens expire. So last two steps need to should be repeated to refresh the token and hand it over to the untrusted device for use.

...