Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add exemples full CIBA flow for CIBA in CAMARA-ICM-examples.md #236

Open
sebdewet opened this issue Nov 26, 2024 · 2 comments · May be fixed by #237
Open

Add exemples full CIBA flow for CIBA in CAMARA-ICM-examples.md #236

sebdewet opened this issue Nov 26, 2024 · 2 comments · May be fixed by #237
Labels
documentation Improvements or additions to documentation spring25-candidate

Comments

@sebdewet
Copy link
Collaborator

Problem description
In CAMARA-ICM-examples.md, only the authorization code flow is detailed, not the CIBA flow with responses.

Expected action

below this

CIBA authentication request with one purpose and two scopes

See CIBA authentication request

POST /bc-authorize HTTP/1.1
   Host: server.example.com
   Content-Type: application/x-www-form-urlencoded

scope=openid%20dpv%3AFraudPreventionAndDetection%20sim-swap%3Acheck%20sim-swap%3Aretrieve-date&
login_hint=tel%3A%2B34666666666

Add this :

Successful response

See CIBA Successful Authentication Response

    HTTP/1.1 200 OK
    Content-Type: application/json
    Cache-Control: no-store

    {
      "auth_req_id": "3f7b2e8a-9cde-4f3b-8b12-1a2b3c4d5e6f",
      "expires_in": 120,
      "interval": 2
    }

The Client MUST keep the auth_req_id in order to use when making a token request in Poll mode.
Expires_in and interval can differ

Access token request

See CIBA Token Request

    POST /token HTTP/1.1
    Host: server.example.com
    Content-Type: application/x-www-form-urlencoded

    grant_type=urn%3Aopenid%3Aparams%3Agrant-type%3Aciba&
    auth_req_id=3f7b2e8a-9cde-4f3b-8b12-1a2b3c4d5e6f&
    client_assertion_type=urn%3Aietf%3Aparams%3Aoauth%3A
    client-assertion-type%3Ajwt-bearer&
client_assertion=eyJraWQiOiJzYW1wbGUxIiwibmFtZSI6IkV4YW1wbGUifQ.eyJpc3MiOiJ0ZXN0VXNlciIsInN1YiI6InRlc3RzdWJqZWN0IiwidXNlciI6Imh0dHBzOi8vYXBpLmV4YW1wbGUuY29tIiwianRpIjoiLV9wMTZqNkhjaVhvMzE3aHZaMzEyYyIsImlhdCI6MTYwMDAwMDAwMCwiZXhwIjoxNjAwMDAwNjAwfQ.abcD1234-56efG7hI8jK9lM0nPqRstUvwXYZ
    

Successful response

See CIBA Successful Token Response

            
    HTTP/1.1 200 OK
    Content-Type: application/json
    Cache-Control: no-store

    {
     "access_token": "G5kXH2wHvUra0sHlDy1iTkDJgsgUO1bN",
     "token_type": "Bearer",
     "refresh_token": "4bwc0ESC_IAhflf-ACC_vjD_ltc11ne-8gFPfA2Kx16",
     "expires_in": 120,
     "id_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjE2NzcyNyJ9.eyJpc3MiOiJodHRwczovL3NlcnZlci5leGFtcGxlLmNvbSIsInN1YiI6IjI0ODI4OTc2MTAwMiIsImF1ZCI6InM2QmhkUmtxdDMiLCJlbWFpbCI6Im1vY2tAZXhhbXBsZS5jb20iLCJleHAiOjE1Mzc4MTk4MDQsImlhdCI6MTUzNzgxOTUwNH0.bVq83mdy72ddIFVJLjlNBX-5JHbjmwK-Sn9Mir-blesfYMceIOw6u4GOrO_ZroDnnbJXNKWAg_dxVynvMHnk3uJc46feaRIL4zfHf6Anbf5_TbgMaVO8iczD16A5gNjSD7yenT5fslrrW-NU_vtmi0s1puoM4EmSaPXCR19vRJyWuStJiRHK5yc3BtBlQ2xwxH1iNP49rGAQe_LHfW1G74NY5DaPv-V23JXDNEIUTY-jT-NbbtNHAxnhNPyn8kcO2WOoeIwANO9BfLF1EFWtjGPPMj6kDVrikec47yK86HArGvsIIwk1uExynJIv_tgZGE0eZI7MtVb2UlCwDQrVlg"
    }

Additional context

  • In CIBA authentication request, do we define that client_assertion is mandatory ?
@sebdewet sebdewet added the documentation Improvements or additions to documentation label Nov 26, 2024
@jpengar
Copy link
Collaborator

jpengar commented Nov 26, 2024

@sebdewet Could you create a PR to add your suggested examples for everyone to review?

@sebdewet
Copy link
Collaborator Author

OK, will do it today

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation spring25-candidate
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants