Changes for page Community App Developer Guide
Last modified by bougault on 2022/03/02 11:58
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -6,7 +6,7 @@ 6 6 7 7 The first step is for you to **get the developer accreditation**. Contributors can register and manage applications within the Community Apps Catalogue. 8 8 9 -Send an email to [[support@ humanbrainproject.eu>>mailto:support@humanbrainproject.eu]] with a short summary of your intentions.9 +Send an email to [[support@ebrains.eu>>mailto:support@ebrains.eu]] with a short summary of your intentions. 10 10 11 11 The support team will apply the permissions to your user: your account will be [[upgraded with developers privileges>>doc:Collabs.collab-devs.collaboratory-v2.keycloak.user administration.WebHome]] the next time you will login. 12 12 ... ... @@ -51,20 +51,20 @@ 51 51 52 52 Instances of your applications will be installed by collab authors in many different collabs. In order to let you customise the user experience based on its context, the Collaboratory will automatically pass query parameters to your app: 53 53 54 -* **##clb-collab-id##**: 55 -* ##**clb-doc-path**##: 56 -* ##**clb-doc-name**##: 57 -* ##**clb-drive-id**##: 54 +* **##clb-collab-id##**: the unique, human-readable identifier of the collab. 55 +* ##**clb-doc-path**##: the path of your app instance within the collab. If your app is at the root of a collab, this value will be empty. 56 +* ##**clb-doc-name**##: the name of the document where your app instance is installed. 57 +* ##**clb-drive-id**##: the unique identifier of the drive of the collab. This id is required if you want to fetch or store documents within the drive of the collab. 58 58 59 -== App 59 +== App settings == 60 60 61 -The 61 +The app settings are the values the collab author can modify to change the behaviour of your application within her collab. 62 62 63 63 === Writing settings === 64 64 65 -The 65 +The Collaboratory comes with a mechanism to let your app store these settings directly in the Collaboratory. 66 66 67 -In 67 +In order to do that, your app needs to use the [[postMessage javascript API>>https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage]] to send the settings to store to the Collaboratory: 68 68 69 69 {{code language="javascript"}} 70 70 window.parent.postMessage({ ... ... @@ -74,7 +74,7 @@ 74 74 setting2: 'setting 2 value', 75 75 // ... 76 76 // reload: false // avoid page reload on settings change 77 - }}, 'https://wiki. humanbrainproject.eu');77 + }}, 'https://wiki.ebrains.eu'); 78 78 {{/code}} 79 79 80 80 === Fetching settings === ... ... @@ -89,6 +89,8 @@ 89 89 1. use the token to call the create endpoint 90 90 1. save your registration access token for further modifications of your client 91 91 92 +Note that a [[notebook>>https://lab.ebrains.eu/user-redirect/lab/tree/drive/Shared%20with%20all/Collaboratory%20Community%20Apps/Managing%20an%20OpenID%20Connect%20client.ipynb||rel="noopener noreferrer" target="_blank"]] is available to help you create and modify your OIDC client. 93 + 92 92 === Fetching your developer access token === 93 93 94 94 Getting your developer token is done in one simple step: authenticate against the developer client with the password grant. ... ... @@ -101,7 +101,7 @@ 101 101 echo '\nEnter your password' && read -s clb_dev_pwd && 102 102 103 103 # Fetch the token 104 -curl -X POST https://iam. humanbrainproject.eu/auth/realms/hbp/protocol/openid-connect/token \106 +curl -X POST https://iam.ebrains.eu/auth/realms/hbp/protocol/openid-connect/token \ 105 105 -u developer: \ 106 106 -d 'grant_type=password' \ 107 107 --data-urlencode "username=${clb_dev_username}" \ ... ... @@ -140,7 +140,7 @@ 140 140 clb_dev_token=... 141 141 142 142 # Send the creation request 143 -curl -X POST https://iam. humanbrainproject.eu/auth/realms/hbp/clients-registrations/default/ \145 +curl -X POST https://iam.ebrains.eu/auth/realms/hbp/clients-registrations/default/ \ 144 144 -H "Authorization: Bearer ${clb_dev_token}" \ 145 145 -H 'Content-Type: application/json' \ 146 146 -d '{ ... ... @@ -228,7 +228,7 @@ 228 228 clb_reg_token=... 229 229 230 230 # Update the client 231 -curl -X PUT https://iam. humanbrainproject.eu/auth/realms/hbp/clients-registrations/default/my-awesome-client \233 +curl -X PUT https://iam.ebrains.eu/auth/realms/hbp/clients-registrations/default/my-awesome-client \ 232 232 -H "Authorization: Bearer ${clb_reg_token}" \ 233 233 -H 'Content-Type: application/json' \ 234 234 -d '{ ... ... @@ -247,5 +247,5 @@ 247 247 Note that your need to provide your client id both in the endpoint URL and within the body of the request. 248 248 249 249 {{warning}} 250 -/!\ ** Each time you modify your client, a new registration access token will be generated. You need to track of your token changes to keep access to your client. **/!\ 252 +/!\ ** Each time you modify your client, a new registration access token will be generated. You need to keep track of your token changes to keep access to your client. **/!\ 251 251 {{/warning}}