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 (1 modified, 0 added, 0 removed)
-
Attachments (0 modified, 0 added, 2 removed)
Details
- Page properties
-
- Content
-
... ... @@ -6,7 +6,7 @@ 6 6 7 7 The client is confidential with a secret, you obtain it throught the registering oidc client tutorial above. 8 8 9 -[[image:Screenshot 2020-07-15 at 17.47.12.png ||height="517" width="758"]]9 +[[image:Screenshot 2020-07-15 at 17.47.12.png]] 10 10 11 11 12 12 The whole authentication flow presented here is based on the official OAuth2 rfc describe in the section 4.1 ... ... @@ -13,8 +13,6 @@ 13 13 14 14 [[https:~~/~~/tools.ietf.org/html/rfc6749#section-4.1>>https://tools.ietf.org/html/rfc6749#section-4.1]] 15 15 16 -[[image:Screenshot 2020-07-15 at 18.32.14.png||height="410" width="474"]] 17 - 18 18 == Authentication flow == 19 19 20 20 === Authorization Code Grant === ... ... @@ -98,53 +98,3 @@ 98 98 ))) 99 99 100 100 You get a response containing the access token and others 101 - 102 -== Access user info == 103 - 104 -==== Request ==== 105 - 106 -Now that your application got the access token of your user, it's really easy to fetch user info 107 - 108 -(% class="box infomessage" %) 109 -((( 110 -/GET https:/iam.ebrains.eu/auth/realms/hbp/protocol/openid-connect/userinfo 111 -))) 112 - 113 -and just provide the access token as **Authentication** header 114 - 115 -[[image:Screenshot 2020-07-15 at 18.28.28.png||height="161" width="566"]] 116 - 117 - 118 -==== Response ==== 119 - 120 -As response you will have a json with all the information on the logged user, for my user 121 - 122 -(% class="box" %) 123 -((( 124 -{ 125 - "sub": "fa2db206-3eb4-403c-894a-810ebaba98e1", 126 - "unit": [ 127 - "/collab-devs", 128 - "/collab-team", 129 - "/all/institutions/switzerland/epfl", 130 - "/all/projects/hbp/consortium/SGA2/SP05", 131 - "/all/projects/hbp/consortium/SGA3/WP6/T6_11" 132 - ], 133 - "roles": { 134 - "jupyterhub": [ 135 - "feature:authenticate" 136 - ], 137 - "xwiki": [ 138 - "feature:authenticate" 139 - ], 140 - "team": [ 141 - "collab-collaboratory-community-apps-editor" 142 - ], 143 - "group": [ 144 - "group-collaboratory-developers", 145 - "unit-all-projects-hbp-consortium-sga2-sp05-administrator" 146 - ] 147 - }, 148 - "mitreid-sub": "305862" 149 -} 150 -)))
- Screenshot 2020-07-15 at 18.28.28.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.messines - Size
-
... ... @@ -1,1 +1,0 @@ 1 -58.4 KB - Content
- Screenshot 2020-07-15 at 18.32.14.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.messines - Size
-
... ... @@ -1,1 +1,0 @@ 1 -161.8 KB - Content