Changes for page 2. Authenticating with your OIDC client and fetch collab user info
Last modified by messines on 2021/06/08 17:32
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki.m essines1 +XWiki.mmorgan - Content
-
... ... @@ -44,11 +44,6 @@ 44 44 * **openid: **This scope is required because we use the OIDC protocol. It will give your app access to the user's basic information such as username, email and full name. 45 45 * **group **(optional)**: **If you request this scope, the future access token generated will authorize your app to identify which units and groups the user belongs to. 46 46 * **team **(optional)**: **This scope is like the group scope lets your app identify the permissions of the user, but by identifying what collabs the user has access to and with what roles. 47 -* **clb.wiki.read **(optional): access to GET Collab API 48 -* **clb.wiki.write** (optional): access to DELETE/PUT/POST Collab API 49 -* **clb.drive:read **(optional): access to GET Drive API 50 -* **clb.drive:write** (optional): access to DELETE/PUT/POST Drive API 51 -* **offline_access : **provide refresh token 52 52 53 53 {{info}} 54 54 The group and team scopes are a simple way for your app to grant permissions to its services and resources when you want to grant access to a very few units, groups, or collab teams. For more complex permission management, contact support. ... ... @@ -70,9 +70,10 @@ 70 70 (% class="wikigeneratedid" id="HRequest-1" %) 71 71 Now that your app has the **authorization** **code** for a user, it can fetch the user access token 72 72 68 +(% class="wikigeneratedid" %) 73 73 ==== Request ==== 74 74 75 -/POST: [[https: ~~/~~/iam.ebrains.eu/auth/realms/hbp/protocol/openid-connect/token>>https://iam.ebrains.eu/auth/realms/hbp/protocol/openid-connect/token]]71 +/POST: [[https:/iam.ebrains.eu/auth/realms/hbp/protocol/openid-connect/token>>url:https:/iam.ebrains.eu/auth/realms/hbp/protocol/openid-connect/token]] 76 76 77 77 with the following parameters: 78 78 ... ... @@ -114,7 +114,7 @@ 114 114 115 115 ==== Request ==== 116 116 117 -/GET: [[https: ~~/~~/iam.ebrains.eu/auth/realms/hbp/protocol/openid-connect/userinfo>>https://iam.ebrains.eu/auth/realms/hbp/protocol/openid-connect/userinfo]]113 +/GET: [[https:/iam.ebrains.eu/auth/realms/hbp/protocol/openid-connect/userinfo>>url:https:/iam.ebrains.eu/auth/realms/hbp/protocol/openid-connect/userinfo]] 118 118 119 119 with the following parameters: 120 120 ... ... @@ -126,7 +126,7 @@ 126 126 127 127 ==== Response ==== 128 128 129 -As response your app receives a JSON with all the information aboutthe logged user125 +As response your app receives a JSON with all the information on the logged user 130 130 131 131 (% class="box" %) 132 132 ((( ... ... @@ -133,6 +133,8 @@ 133 133 { 134 134 "sub": "fa2db206-3...0ebaba98e1", 135 135 "unit": [ 132 + "/collab-devs", 133 + "/collab-team", 136 136 "/all/institutions/switzerland/epfl", 137 137 "/all/projects/hbp/consortium/SGA2/SP05", 138 138 "/all/projects/hbp/consortium/SGA3/WP6/T6_11" ... ... @@ -149,7 +149,7 @@ 149 149 ], 150 150 "group": [ 151 151 "**group**-collaboratory-developers", 152 - "**unit**-all-projects-hbp-consortium-sga2-sp05- **administrator**"150 + "**unit**-all-projects-hbp-consortium-sga2-sp05-administrator" 153 153 ] 154 154 }, 155 155 "mitreid-sub": "30...62" ... ... @@ -156,10 +156,12 @@ 156 156 } 157 157 ))) 158 158 159 -The u nitfield above lists CollaboratoryUnitswhichthe user isamemberof,with the unitslashes instead of the colons you see in the Collaboratory UI.157 +The group field above lists Collaboratory Groups in the form "group-//groupname//" and Collaboratory Units in the form "unit-//unitname//" with the unitname using dashes instead of the colons you see in the Collaboratory UI. 160 160 161 - jupyterhubandxwikiareOIDC clientswith more advancedpermissionmanagement.159 +The team field above lists Collaboratory Teams in the form "collab-//collabname//-//role//" where //role //is one of admin, editor, or viewer according to the user's role in collab //collabname//. 162 162 163 - Theteam field above lists Collaboratory Teams which theuser is a memberof, in the form "collab-//collabname//-//role//"where //role //is one of admin,editor, or vieweraccording to theuser'srole incollab //collabname//.161 +jupyterhub and xwiki are OIDC clients. 164 164 165 -The group field above lists Collaboratory Groups which the user is a member of, in the form "group-//groupname//". It also lists Collaboratory Units which the user is an admin of, in the form "unit-//unitname//-administrator" with //unitname //using dashes instead of the colons you see in the Collaboratory UI. 163 +The unit field above lists [useless noise?]. 164 + 165 +