Warning:  Due to planned infrastructure maintenance, the EBRAINS Wiki and EBRAINS Support system will be unavailable for up to three days starting Monday, 14 July. During this period, both services will be inaccessible, and any emails sent to the support address will not be received.

Attention: We are currently experiencing some issues with the EBRAINS Drive. Please bear with us as we fix this issue. We apologise for any inconvenience caused.


Last modified by hbpadmin on 2021/06/15 17:59

From version 1.1
edited by messines
on 2020/12/04 11:25
Change comment: There is no comment for this version
To version 3.1
edited by messines
on 2020/12/04 11:46
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -8,7 +8,8 @@
8 8  == Configure your OIDC Client ==
9 9  
10 10  First thing to do is to configure your OIDC client as a Service account. You juste have to provide **"serviceAccountsEnabled" : true** in the définition of your client. Please have a look to this documentation know [[how to modify your oidc client.>>https://wiki.ebrains.eu/bin/view/Collabs/collaboratory-community-apps/Community%20App%20Developer%20Guide/1.%20Registering%20an%20OIDC%20client/]]
11 -\\~{~{code language="json"}}
11 +
12 +{{code language="json"}}
12 12  {
13 13   "defaultClientScopes" : [
14 14   "web-origins",
... ... @@ -23,6 +23,31 @@
23 23   ...,
24 24   "serviceAccountsEnabled" : true
25 25  }
26 -~{~{/code}}
27 +{{/code}}
27 27  
28 -
29 +
30 +== Generate an Access token using client credentials ==
31 +
32 +==== **Endpoint :** ====
33 +
34 +https://iam.ebrains.eu/auth/realms/hbp/protocol/openid-connect/token
35 +
36 +==== **Params :** ====
37 +
38 +(% class="box" %)
39 +(((
40 +**Request Body**
41 +grant_type: "client_credentials"
42 +client_id: "clientId"
43 +client_secret: "clientSecret"
44 +scope: "The scopes you need and which are available in your client"
45 +)))
46 +
47 +{{code language="bash"}}
48 +
49 +# Send the get access token request
50 +curl -X POST https://iam.ebrains.eu/auth/realms/hbp/protocol/openid-connect/token \
51 + -H 'Content-Type: application/x-www-form-urlencoded' \
52 + -d "grant_type=client_credentials&client_id=myclient&client_secret=mysecret&scope=email%20profile%20team%20group%20clb.wiki.read%20clb.wiki.write"
53 +
54 +{{/code}}