Identity providers
Open Payments requires any authorization server that issues interactive grants to integrate with an IdP. An interactive grant is a grant that requires explicit user interaction/consent from the resource owner before an access token can be issued. In Open Payments, an interactive grant must be issued before an outgoing payment resource can be created.
What happens from the client’s perspective
Section titled “What happens from the client’s perspective”When you (the client) request an interactive grant for an outgoing payment, the authorization server returns an interaction URI in addition to the usual continuation URI. From there:
- Redirect the user to the interaction URI returned by the authorization server.
- The authorization server starts the interaction and redirects the user to the ASE’s IdP.
- The user authenticates with their ASE and reviews the transaction details.
- The user accepts or rejects the request at the IdP.
- After the interaction completes, the authorization server redirects the user back to the
interact.finishURI you supplied in your initial grant request, including ahashparameter and aninteract_ref. - Verify the hash to confirm the redirect emanated from the authorization server. See Hash verification.
- Send a Grant Continuation request to the continuation URI to obtain the access token.
The following diagram illustrates the flow of an interactive grant.
sequenceDiagram autonumber
Client->>Authorization server (AS): POST grant request (with interact object)
Authorization server (AS)-->>Client: 200 OK, returns interact redirect URI and continue URI
Client->>Authorization server (AS): Navigates to interact redirect URI
Authorization server (AS)->>Authorization server (AS): Starts interaction and sets session
Authorization server (AS)-->>Client: 302 temporary redirect to identity provider
URI with grant info in query string
Client->>Identity provider (IdP): Redirects to identity provider
Identity provider (IdP)->>Identity provider (IdP): Resource owner (e.g. client user)
accepts interaction
Identity provider (IdP)->>Authorization server (AS): Sends interaction choice
Authorization server (AS)-->>Identity provider (IdP): 202 choice accepted
Identity provider (IdP)->>Authorization server (AS): Requests to finish interaction
Authorization server (AS)->>Authorization server (AS): Ends session
Authorization server (AS)-->>Identity provider (IdP): 302 temporary redirect to finish URI
(defined in initial grant request)
secured with unique hash and
interact_ref in query string
Identity provider (IdP)->>Client: Follows redirect
Client->>Client: Verifies hash
Client->>Authorization server (AS): POST grant continuation request with
interact_ref in body to continue URI
Authorization server (AS)-->>Client: 200 OK, returns grant access token