Changes for page Community App Developer Guide
Last modified by bougault on 2022/03/02 11:58
Summary
-
Page properties (2 modified, 0 added, 0 removed)
-
Objects (0 modified, 0 added, 2 removed)
Details
- Page properties
-
- Parent
-
... ... @@ -1,1 +1,1 @@ 1 -Collabs.collab oratory-community-apps.WebHome1 +Collabs.collab-devs.RFC.WebHome - Content
-
... ... @@ -1,66 +1,43 @@ 1 - Developers can extend the Collaboratorycapabilities byprovidingapplicationsto its community of users.1 +The Collaboratory is designed to be extended with applications provided by its community of users. 2 2 3 -This guide describes thestepsto make this possible.3 +This guide describes how developers can contribute by creating and registering applications within the Collaboratory. 4 4 5 +{{toc numbered="true" start="2"/}} 6 + 5 5 == Becoming a contributor == 6 6 7 -The first step is for you to **getthedeveloperaccreditation**. Contributors can register and manage applications within the Community Apps Catalogue.9 +The first step is for you to be recognised as a contributor. 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.11 +To become a contributor, send an email to [[support@humanbrainproject.eu>>mailto:support@humanbrainproject.eu]] with a short summary of your intentions. 10 10 11 -The support team will apply the permissions to your user :your account will be upgraded with developers privilegesthe next time you will login.13 +The support team will apply the permissions to your user and the next time you will login, your account will be upgraded with developers privileges. 12 12 13 13 (% class="box infomessage" %) 14 14 ((( 15 - Only SGA2 accredited users will be automatically granted thedeveloperaccreditation.17 +Please note that, currently, only SGA2 accredited users will be automatically granted the contributor level. 16 16 ))) 17 17 18 -(% class="wikigeneratedid" %) 19 -== Making your app available to users == 20 +== Registering an application in the Catalogue == 20 20 21 - In order for youapplication to benstallableby users, it needs toeregistered within the [[Community AppsCatalogue>>doc:Apps.WebHome]].22 +The Community Apps Catalogue is the place where collab authors look for applications to add to their collabs. 22 22 23 -Once this simple step is complete, users will be able to install your app within their collabs. 24 +{{error}} 25 +TODO: describe the steps to register an app in the Catalogue 26 +{{/error}} 24 24 25 -=== Registering an application in the Catalogue === 26 - 27 -Navigate to the catalogue and click on **+Create App** in the top right corner. Enter a name for your app and click on **Create**. 28 - 29 -Fill the form with the following information: 30 - 31 -* **main URL**: the URL of the homepage of your app. This is where user will be directed when then open your app in a collab. 32 -* **settings URL**: the URL of the your settings management page if you have one. 33 -* **description**: a description of what your app does to help users select it. 34 -* **under development?**: should be checked if you don't want your app to be available by default by other users. 35 -* **category**: a category to help structuring the applications. 36 -* **maintainers**: a list of users who maintain the app. The users need to have logged in the wiki at least once to be found. Maintainers are granted the right to modify an app registration. 37 -* **documentation URL**: if your app has online user documentation, a link will be provided to users when they use your app. 38 -* **repository**: a URL to a public repository so users can check the sources of your app. 39 - 40 -Click on **Save**. Your app is now registered and waiting for users to install it! 41 - 42 -=== Installing your app in a collab === 43 - 44 -1. In order to install your app, you need to navigate to a collab where you have either the **editor** or **administrator** role. 45 -1. Click on **Create**. Enter a title for this instance of your app and select **Community App** in the right selector. 46 -1. Click on **Create**. You will be presented with the Community App Catalogue. The app you will see are the public apps and the ones your a maintainer of. 47 -1. Select your app and click on **Save and View**. 48 - 49 -You should now see how your app looks like within a collab. 50 - 51 51 == Creating your OpenID Connect client == 52 52 53 53 The steps to create an OpenID Connect client are the following: 54 54 55 - 1.get an access token from the `developer` client56 - 1.use the token to call the create endpoint57 - 1.save your registration access token for further modifications of your client32 +* get an access token from the `developer` client 33 +* use the token to call the create endpoint 34 +* save your registration access token for further modifications of your client 58 58 59 59 === Fetching your developer access token === 60 60 61 - Getting your developer tokenis doneinonesimplestep:authenticate against the developer client with the password grant.38 +In order to get your developer token, you need to authenticate against the developer client with the password grant. 62 62 63 -This can be achieved with this sample sh ellscript:40 +This can be achieved with this sample bash script: 64 64 65 65 {{code language="bash"}} 66 66 # Gather username and password from user ... ... @@ -96,125 +96,8 @@ 96 96 } 97 97 {{/code}} 98 98 99 -Copy the "access_token" value, youwill neediffor the next step.76 +Copy the "access_token" value, it is the one that will be needed for the next step. 100 100 101 101 === Creating the client === 102 102 103 -You can now create clients by sending a JSON representation to a specific endpoint: 104 - 105 -{{code language="bash"}} 106 -# Set your developer token 107 -clb_dev_token=... 108 - 109 -# Send the creation request 110 -curl -X POST https://iam.humanbrainproject.eu/auth/realms/hbp/clients-registrations/default/ \ 111 - -H "Authorization: Bearer ${clb_dev_token}" \ 112 - -H 'Content-Type: application/json' \ 113 - -d '{ 114 - "clientId": "my-awesome-client", 115 - "name": "My Awesome App", 116 - "description": "This describes what my app is for end users", 117 - "rootUrl": "https://root.url.of.my.app", 118 - "baseUrl": "/relative/path/to/its/frontpage.html", 119 - "redirectUris": [ 120 - "/relative/redirect/path", 121 - "/these/can/use/wildcards/*" 122 - ], 123 - "webOrigins": ["+"], 124 - "bearerOnly": false, 125 - "consentRequired": true, 126 - "standardFlowEnabled": true, 127 - "implicitFlowEnabled": true, 128 - "directAccessGrantsEnabled": false, 129 - "attributes": { 130 - "contacts": "first.contact@example.com; second.contact@example.com" 131 - } 132 - }' | 133 - 134 -# Prettify the JSON response 135 -json_pp; 136 -{{/code}} 137 - 138 -In case of success, the endpoint will return its representation of your client: 139 - 140 -{{code language="json"}} 141 -{ 142 - "defaultClientScopes" : [ 143 - "web-origins", 144 - "roles" 145 - ], 146 - "redirectUris" : [ 147 - "/relative/redirect/path", 148 - "/these/can/use/wildcards/*" 149 - ], 150 - "nodeReRegistrationTimeout" : -1, 151 - "rootUrl" : "https://root.url.of.my.app", 152 - "webOrigins" : [ 153 - "+" 154 - ], 155 - "authenticationFlowBindingOverrides" : {}, 156 - "baseUrl" : "/relative/path/to/its/frontpage.html", 157 - "description" : "This describes what my app is for end users", 158 - "notBefore" : 0, 159 - "frontchannelLogout" : false, 160 - "enabled" : true, 161 - "registrationAccessToken" : "eyJhbGciOi...", 162 - "consentRequired" : true, 163 - "fullScopeAllowed" : false, 164 - "clientAuthenticatorType" : "client-secret", 165 - "surrogateAuthRequired" : false, 166 - "directAccessGrantsEnabled" : false, 167 - "standardFlowEnabled" : true, 168 - "id" : "551b49a0-ec69-41af-9461-6c10fbc79a35", 169 - "attributes" : { 170 - "contacts" : "first.contact@example.com; second.contact@example.com" 171 - }, 172 - "name" : "My Awesome App", 173 - "secret" : "your-client-secret", 174 - "publicClient" : false, 175 - "clientId" : "my-awesome-client", 176 - "optionalClientScopes" : [], 177 - "implicitFlowEnabled" : true, 178 - "protocol" : "openid-connect", 179 - "bearerOnly" : false, 180 - "serviceAccountsEnabled" : false 181 -} 182 -{{/code}} 183 - 184 -Among all the attributes, you should securely save: 185 - 186 -* your client **secret** ("secret" attribute): it is needed by your application to **authenticate to the IAM server** when making backend calls 187 -* your client **registration access token** ("registrationAccessToken"): you will need it to authenticate when **modifying your client in the future** 188 - 189 -=== Modifying your client === 190 - 191 -Update your client with a PUT request: 192 - 193 -{{code language="bash"}} 194 -# Set your registration token and client id 195 -clb_reg_token=... 196 - 197 -# Update the client 198 -curl -X PUT https://iam.humanbrainproject.eu/auth/realms/hbp/clients-registrations/default/my-awesome-client \ 199 - -H "Authorization: Bearer ${clb_reg_token}" \ 200 - -H 'Content-Type: application/json' \ 201 - -d '{ 202 - "clientId": "my-awesome-client", 203 - "redirectUris": [ 204 - "/relative/redirect/path", 205 - "/these/can/use/wildcards/*", 206 - "/a/new/redirect/uri" 207 - ] 208 - }' | 209 - 210 -# Prettify the JSON response 211 -json_pp; 212 -{{/code}} 213 - 214 - Note that your need to provide your client id both in the endpoint URL and within the body of the request. 215 - 216 -{{warning}} 217 -/!\ ** 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. **/!\ 218 -{{/warning}} 219 - 220 -== == 80 +Clients can be created by sending a JSON representation t
- XWiki.DocumentSheetBinding[0]
-
- Sheet
-
... ... @@ -1,1 +1,0 @@ 1 -Collaboratory.Apps.Article.Code.ArticleViewSheet
- XWiki.DocumentSheetBinding[1]
-
- Sheet
-
... ... @@ -1,1 +1,0 @@ 1 -Collaboratory.Apps.Article.Code.ArticlePreviewSheet