| 1 | = Support for OpenID = |
| 2 | |
| 3 | The goal is to let users attach to projects using OpenID. |
| 4 | |
| 5 | == Interface == |
| 6 | |
| 7 | * On the "identify your account" page of the Attach Project wizard, |
| 8 | add a "Log in with OpenID" button. |
| 9 | * Selecting this opens a web browser window. |
| 10 | * User sees a page on project site listing OpenID providers (Google, Facebook, etc.). |
| 11 | User clicks one. |
| 12 | * The user sees the provider's login page. |
| 13 | Depending on the provider, they may see |
| 14 | "OK to send email addr to (project URL)?" |
| 15 | * On successful login, user sees Welcome page on project site |
| 16 | * Wizard shows Done page |
| 17 | |
| 18 | == Implementation == |
| 19 | |
| 20 | DB table |
| 21 | * openid_login. |
| 22 | fields: nonce, status |
| 23 | |
| 24 | Project PHP pages |
| 25 | |
| 26 | * '''openid_login.php''': |
| 27 | Manager goes here. |
| 28 | It takes a nonce ID as an arg. |
| 29 | It creates an openid_login record. |
| 30 | Shows list of links to OpenID providers. |
| 31 | * '''openid_callback.php''': |
| 32 | Called by OpenID provider. |
| 33 | Takes nonce ID as arg. |
| 34 | Creates user record if needed. |
| 35 | Displays status to user. |
| 36 | Updates status field of openid_login record. |
| 37 | * '''openid_poll.php''': |
| 38 | Web RPC called by client. |
| 39 | Takes nonce ID as arg. |
| 40 | Returns status. |
| 41 | |
| 42 | GUI RPCs |
| 43 | |
| 44 | * '''openid_poll(url, nonce)''': |
| 45 | initiate call to openid_poll.php |
| 46 | * '''openid_poll_poll(status)''': |
| 47 | poll for completion |
| 48 | |
| 49 | Manager |
| 50 | |
| 51 | If user selects OpenID login: |
| 52 | * create nonce ID, open browser to openid_login.php |
| 53 | * show "communication with project" page |
| 54 | * call openid_poll() and openid_poll_poll() |
| 55 | until get status other than PENDING |
| 56 | * show success or failure |