Last modified by messines on 2021/06/08 17:32

From version 8.1
edited by messines
on 2020/07/15 18:33
Change comment: There is no comment for this version
To version 12.1
edited by messines
on 2020/07/15 18:44
Change comment: There is no comment for this version

Summary

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="453" width="664"]]
9 +[[image:Screenshot 2020-07-15 at 17.47.12.png||height="517" width="758"]]
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
... ... @@ -19,6 +19,8 @@
19 19  
20 20  === Authorization Code Grant ===
21 21  
22 +The first step of the authentication protocol is to fetch an **authorization code **for your client and your user
23 +
22 22  ==== Request ====
23 23  
24 24  /GET on [[https:~~/~~/iam.ebrains.eu/auth/realms/hbp/protocol/openid-connect/auth >>https://iam.ebrains.eu/auth/realms/hbp/protocol/openid-connect/auth]]
... ... @@ -41,7 +41,7 @@
41 41  
42 42  ==== Scope ====
43 43  
44 -In the request you can see a scope **parameter**
46 +In the request you can see a **scope** **parameter**
45 45  
46 46  * **openid : **This scope is required in oidc, it contains basic information of the user such as it username, email and full name.
47 47  * **group **( optional ) **: **This scope is provided by our service, if you add it to your authorization code grant request, the futur access token generated will be able to read which units and groups the logged user belongs, it can be very important for your application. You can notice on the screenshot in the abstract section that **Consent required **is **on, **it means that at loggin time, the user will be asked if he allow your application to access there unit and group membership
... ... @@ -101,6 +101,8 @@
101 101  
102 102  == Access user info ==
103 103  
106 +==== Request ====
107 +
104 104  Now that your application got the access token of your user, it's really easy to fetch user info
105 105  
106 106  (% class="box infomessage" %)
... ... @@ -108,11 +108,13 @@
108 108  /GET https:/iam.ebrains.eu/auth/realms/hbp/protocol/openid-connect/userinfo
109 109  )))
110 110  
111 -and just provide the access token as **Authentication** header
115 +and just provide the access token as **Authorization** header
112 112  
113 113  [[image:Screenshot 2020-07-15 at 18.28.28.png||height="161" width="566"]]
114 114  
115 115  
120 +==== Response ====
121 +
116 116  As response you will have a json with all the information on the logged user, for my user
117 117  
118 118  (% class="box" %)