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

Integration with FranceConnect Particuliers (FCP) #404

Open
bobeal opened this issue Sep 18, 2017 · 9 comments
Open

Integration with FranceConnect Particuliers (FCP) #404

bobeal opened this issue Sep 18, 2017 · 9 comments

Comments

@bobeal
Copy link
Member

bobeal commented Sep 18, 2017

New features to integrate in profile page :

  • Associate an FCP identity (if none yet)
  • Remove an FCP identity association (if one exists)
  • Synchronize an Ozwillo profile with an FCP identity (if one exists)
    • With field level selection of data to synchronize
  • Hiding of "Password change" link
  • Change an email address if account has no associated password
  • Set a password for FCP accounts that do not have one
@bobeal bobeal added this to the 1.49.0 milestone Sep 18, 2017
@tbroyer
Copy link

tbroyer commented Sep 18, 2017

Note: the email address is verified on FCP side, and will be part of the identity (https://partenaires.franceconnect.gouv.fr/monprojet/decouverte/), so should Ozwillo just use it? In this case, we could cross out "change an email address if account has no associated password"…

@bobeal bobeal assigned Nicoletti-Seb and unassigned flaussinot Nov 9, 2017
@tbroyer
Copy link

tbroyer commented Nov 20, 2017

The /d/user/{user_id} Kernel endpoint will return a new authentication_methods property with possible values pwd and franceconnect. Either one or both values can be present to tell whether the account has a password and/or is linked to a FCP identity.

To link the account with FCP and/or synchronize the profile info, the user's browser must make an HTTP POST request to the /a/franceconnect/login Kernel endpoint with application/x-www-form-urlencoded payload containing a continue key whose value is the URI to redirect to after successful authentication (possibly transparent) to FCP. The user will only be redirected to the continue URL if the authentication and/or linking succeeds.
The continue URL will have to make a call (HTTP GET or POST) to the /a/franceconnect/userinfo Kernel endpoint to retrieve the FCP identity (this reverse-proxies the request to the FCP UserInfo endpoint, with the appropriate FCP access token). In case of error (could signal an expired FCP access token), the Portal should start the "FCP dance" again (HTTP POST to /a/franceconnect/login; probably user-driven from an error page, e.g. "there was an error, try again", with a button submitting the form to the Kernel). Due to FCP limitations, the Portal should probably cache the result somehow to survive page reloads and prevent those error conditions (but then clear the cache when starting the "FCP dance" to retrieve fresh informations).

To remove the FCP identity association, a simple link to /a/franceconnect/unlink on the Kernel will be enough. The Kernel will display a confirmation page and handle everything. Upon "unlinking", the Kernel will redirect to the Portal's "my profile" page, so there's no need for a "continue URL".

To set a password, the same /a/password Kernel page will be used as for changing an existing password; the page will adapt depending on whether the account already has a password or not.

@Nicoletti-Seb
Copy link
Contributor

To synchronize the profile info with FranceConnect @tbroyer you say in your previous comment to make an HTTP POST request to /a/franceconnect/login but I found in kernel an endpoint to /a/franceconnect/link. So, to link an account to franceconnect I am not sure about url and parameters to use. Do you need this parameters (FranceConnect Particulier) in request and a continue parameter to do an redirection ?

@tbroyer
Copy link

tbroyer commented Nov 23, 2017

/a/franceconnect/link is an "internal" endpoint used in some cases after coming back from FranceConnect. The one the Portal needs to POST to is /a/franceconnect/login (that's actually the only one in the Kernel that accepts form POST requests from the Portal: @StrictReferer(allowPortal=true); for reference, @StrictReferer triggers a check on Origin or Referer request headers to prevent CSRF, and for /a/franceconnect/login we make an exception for the Portal).

@bobeal
Copy link
Member Author

bobeal commented Dec 10, 2017

  • Rename "France Connect" to "FranceConnect Particuliers"
  • Use the word "Lier" (resp "Supprimer la liaison") instead of "Synchroniser" (resp "Désynchroniser") ?
  • Center the button "Désynchroniser ..." (as for the "Synchroniser ..." one)
  • Display an error message when the profile sync with FCP is not possible

@tbroyer
Copy link

tbroyer commented Dec 11, 2017

Rename "France Connect" to "FranceConnect Particuliers"

I would disagree with this one. Only the developer documentation ever calls it that way; everywhere else, and for everyone, it's just FranceConnect. When FranceConnect Agent will be a thing, then I believe there will be "FranceConnect" and "FranceConnect Agent" (and for now, FranceConnect Entreprise looks as if it's anecdotal, and the two websites I know of that use it just call it “FranceConnect” too).

Your call though.

@bobeal
Copy link
Member Author

bobeal commented Dec 11, 2017

OK, you win, let's go for FranceConnect :)

@bobeal
Copy link
Member Author

bobeal commented Jan 9, 2018

From the profile page :

  • There are still centering problems with the FranceConnect buttons (see screenshot)

From the profile synchronization page :

  • If I choose my birth date from FCP, there is a serialization error :
error: "Bad Request"
exception: "org.springframework.http.converter.HttpMessageNotReadableException"
message: "Could not read document: Can not deserialize value of type java.time.LocalDate from String "1981,6,23": Text '1981,6,23' could not be parsed at index 4↵ at [Source: java.io.PushbackInputStream@28b29955; line: 1, column: 526] (through reference chain: org.oasis_eu.portal.model.kernel.UserProfile["birthdate"]); nested exception is com.fasterxml.jackson.databind.exc.InvalidFormatException: Can not deserialize value of type java.time.LocalDate from String "1981,6,23": Text '1981,6,23' could not be parsed at index 4↵ at [Source: java.io.PushbackInputStream@28b29955; line: 1, column: 526] (through reference chain: org.oasis_eu.portal.model.kernel.UserProfile["birthdate"])"
path: "/my/api/profile"
status: 400
timestamp: 1515487932851
  • Even if I don't choose my birth date from FCP, there is an error (Could not read document: Can not deserialize value of type java.time.LocalDate from String "on")
  • If a data is not present in my Ozwillo profile, it should not be displayed and instead it should only ask whether I want to synchronize it (via a checkbox)
  • It misses an explanation about what is going on this page and how it works

screenshot from 2018-01-08 11-10-15

@bobeal
Copy link
Member Author

bobeal commented Jan 11, 2018

  • "The field Gender was not inform in your account. Do you want to update field Gender with value from FranceConnect ?" to be rewritten as "The Gender field is not filled in your Ozwillo account. Do you want to initialize it with the value provided by FranceConnect ?"

@bobeal bobeal modified the milestones: 1.49.0, 1.50.0 May 7, 2018
bobeal added a commit that referenced this issue Jun 15, 2018
- firstname, lastname, other firstnames and birth dates are read only when an account is linked to FCP
- UX improvement for "desynchronize when not yet a pwd" use case
@bobeal bobeal removed this from the 1.50.0 milestone Aug 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants