Page tree
Skip to end of metadata
Go to start of metadata


How to get your access token.

The API is secured with OAuth2.0. To access the API, the developer must have a token. This means that he must be able to retrieve an access token. In order to retrieve an access token, the developer must first be registered on the authorization server.


This request must be made in advance to Mrs. Filoretta Velica at the following address xds@abrumet.be


The following preconditions will be required for any registration with Abrumet:

  • An application
  • A self-signed security certificate
  • Installation of Brusafe + public safety certificates
  • GlobalSign Root CA -
    • GlobalSign Domain Validation CA - SHA256 - G2 

(http://doc.brusafe.be/display/MQE/Certificates?preview=/1540109/1540241/Request%20access%20to%20MultiSafe.dotx)


The following information should appear in the mail:


  • The name of your application
  • The url of your application
  • The access request document complete
  • The type of application
    • Mobile of Application


An email of approval will be sent to you a few days after your request.

How to recover the access token " Bearer"

Following the approval of your request, you will be able to recover your access token

  1. Open your browser, and please go to the following address

 

https://auth.qa.brusafe.be/auth/realms/abrumet/protocol/openid-connect/auth?response_type=id_token%20token&client_id=<Application_Name>&redirect_uri=<Application_URL>&nonce=0

 

Please replace the following parameters:

  • <Application_Name> = the name of your application provided in the access request
  • <Application_URL> = the url of your application provided in the access request

 

It should be noted that we can use this url to have a bearer token. https://auth.qa.brusafe.be/auth/realms/abrumet/protocol/openid-connect/auth?response_type=id_token%20token&client_id=example-pablo-app&redirect_uri=http%3A%2F%2Flocalhost&nonce=0

 

  1. When authentication is done, please copy the generated url. This will contain all the information needed to connect the various web services of the application Abrumet.

 

http://localhost/#id_token=eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICIxSVF1ZzdJOG5uT2IzbWlNLWFtVDVQVTQ5ZHc4YmF5RW9DYWlxVWFMNVFzIn0.eyJqdGkiOiI3YjY4NDdhZC03ZjlkLTRhMzctYTlkOC1kZTM3NzAzNGZkNDkiLCJleHAiOjE1MDk2MzQyNTIsIm5iZiI6MCwiaWF0IjoxNTA5NjMwNjUyLCJpc3MiOiJodHRwczovL2F1dGgucWEuYnJ1c2FmZS5iZS9hdXRoL3JlYWxtcy9hYnJ1bW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SisPVj4_JUZiBQ7Lgj0r1ZpTCG4ji7LIKGnjj_ACk1H1iA_72jbJUJeGRiFOEmOf46QqTfEpWuf7YSwMvtpVmI3iXC1eFXU8t6Ui4E1nslnUiTdSQsQXPVgMDktX3TrEIVO_QjzOdZqsFHVoMSi1IL6ZR338JPMgnm4g4VBaxzwFha40mMiA0MJrwitGTw8LmWP3WysROSCosefQSwAi4Pj1tI-Kw &token_type=bearer&session_state=b7d9121d-d6d6-419b-9ad6-54ddcde3ef75&expires_in=3600&not-before-policy=0

 


The "access_Token" parameter contains the Bearer ID. Each access request must therefore include an Authorization header with the Bearer authentication mechanism.

Par exemple,

Autorisation: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6I

How to recover the SAML Token using the swagger editor

The SAML will manage both the XML message format, called assertion, as well as the information needed for authentication and the exchange process between two major partners:

  • Le SP (Service Provider), which protects access to requested resources (websites, applications etc.) by applying a security policy. For example, it blocks all access to an unauthenticated user and directs it to their identity provider.
  • L'IdP (Identity Provider) responds to the request of the SP. It is responsible for authenticating the user and forging the response containing the information associated with the identity (group in general) and requested by the SP.

 

 

  1. Open your browser and please go to the following address:

 

http://editor2.swagger.io/#!/

 

Texte de remplacement généré par une machine :
O http://editor2.swagger.io 
Swagger Editor 
Preferences 
Generate Server 
# this is an example of the Uber API 
Generate Client 
Help w 
1 
2 
3 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 • 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
33 
34 
35 
36 
37 
38 
39 
40 
41 • 
42 • 
43 
46 
47 
48 
49 
50 Y 
# as a demonstration of an API spec in YAML 
'2.0' 
swagger : 
info: 
title: Uber API 
description: Move your app forward 
version: 
"1.0.0" 
# the domain of the service 
host: api.uber.com 
# array of all schemes that your API 
schemes : 
- https 
# will be prefixed to all paths 
basePath: /vl 
produces : 
application/ j son 
paths : 
/ products: 
get : 
summary: Product Types 
description: I 
Uber API 
Move your app forward with the Uber API 
with the Uber API 
supports 
Version 1.00 
Filter operations by a tag: 
Products 
Estimates 
Paths 
/ products 
GET / products 
Summary 
Product Types 
Description 
User 
The Products endpoint returns information 
offered at a given location. The response 
about the *Uber* products 
includes the display name 
lists the products in the 
Processed with no error 
Products 
and other details about 
proper display order. 
parameters : 
name: latitude 
in: query 
description: Latitude 
required: true 
type: number 
format: double 
name: longitude 
in: query 
description: Longitude 
required: true 
type: number 
format: double 
tags: 
- Products 
responses : 
200: 
each product, 
and 
component 
comp 
nent 
of 
of 
location . 
location . 
The Products endpoint returns information about the Uber products offered at a given location. 
The response includes the display name and other details about each product, and lists the 
products in the proper display order. 
Parameters 
Name 
latitude 
longitude 
Located 
Description 
Latitude component of 
query 
location. 
Longitude component 
query 
of location. 
Required Schema 
description: An array of products 
schema: 
type: array 
items : 
$ref: '#/definitions/Product ' 
default : 
description: Unexpected error 
schema: 
Yes 
Yes 
v number 
(double) 
v number 
(double) 
2:31 PM 
ENG 
11/2/2017

 


  1. Click on "File" and select "Import URL"

 

Texte de remplacement généré par une machine :
File 
Preferences 
Open Example.. 
PasteJSON 
Import URL.. 
Import File.. 
Download YAML 
Download JSON

 

  1. Enter the following address in the dialog box that appears

https://auth.qa.brusafe.be/relation-api/swagger/swagger.json#/

 

Texte de remplacement généré par une machine :
Import From URL 
URL 
https://auth.qa.brusafe.be/relation-api/swagger/swagger.json#/l 
ause CORS proxy 
Valid URL 
Cancel 
Import

  1. Click on "Import"

 

Texte de remplacement généré par une machine :
Cancel 
Import

 

  1. The entire JSON code loads into the swagger editor .

 

Texte de remplacement généré par une machine :
File 
Preferences 
Generate Server 
Generate Client 
Help 
1 
4 
5 
6 
7 
8 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
33 
34 
35 
36 
37 
38 
39 
40 
41 
42 
43 
Swagger: 
info : 
description : 
This is an 
management 
version: VI 
api to manage/view the relations between users in the account 
system 
title: Relation management api 
termsOfService : 
' http://www.github.com/kongchen/swagger-maven-plugin ' 
contact : 
Dioss smart solutions 
name : 
url: 
http://dioss . com ' 
email : 
support@dioss . com 
license: 
EVS 
name : 
url: 
' http://www.dioss . com/vanallerlei-licenses . html ' 
host : 
' localhost: 8080 
basePath: /relation-api/api/vl 
schemes : 
http 
https 
paths: 
[medical/ relation/ as sertion : 
get: 
summary: >- 
Get the assertion that proves there is a relationship between 
therapeutist and patient. 
description : 
operationld: assertRe1ation 
produces : 
application/xml 
application/json 
parameters : 
name: national-registry-number 
All changes saved 
Relation management api 
This is an api to manage/view the relations between users in the account management system 
Version 
Contact information 
Dioss smart solutions 
support@dioss.com 
http://dioss.com 
Terms of service 
http://www.github.com/kongchen/swagger-maven-plugin 
License 
EVS 
Security 
Bearer (API Key) 
Name 
Paths 
Authenticate 
In: query 
required: true 
type: string 
responses : 
200': 
description: 'Ok, 
schema : 
type: string 
description: 
In case a bad 
Authorization 
header 
saml assertion is returned ' 
request 
was 
made . 
The 
possible 
errortypes 
are: 
/medi cal/ relation/ assertion

 

  1. Edit line 16 and replace "localhost: 8080" with the following address "auth.qa.brusafe.be"

 

 

C:\B279EB45\D96688FA-DE21-4CFD-ADD8-CCFBA8A7F299_fichiers\image018.png

 

C:\B279EB45\D96688FA-DE21-4CFD-ADD8-CCFBA8A7F299_fichiers\image019.png

 

  1. Enter the bearer token in the dialog box that appears. Be careful, there must be a space between bearer and your token.

 

 

Texte de remplacement généré par une machine :
API Key Authentication 
API Key 
bearer eyJ 1 NilsInR5cClgOiAiSldUIiwia21kliA61CIxSV 
Cancel 
Authenticate

 

  1. Click on "Authenticate"

 

Texte de remplacement généré par une machine :
Cancel 
Authenticate

  1. Your Bearer Token is configured in order to appeal to different methods

 

 

Texte de remplacement généré par une machine :
Security 
v/ Bearer (API Key) 
Name 
In 
Change Authentication 
Authorization 
header

 

  1.      If you are a practitioner and your patient is not yet connected. Please do the steps:

 

  1. /medical/relation/request (National Register Number of the patient is a precondition).   In the request options, select the "https" protocol as scheme and select "Application / json" format as return. Then click on "Send Request".

 

 

  1. /medical/relation/confirm (National Register Number of the patient is a precondition and the validation code). In the request options, select the "https" protocol as scheme and select "Application / json" format as return. Then click on "Send Request".

Attention, any relation is valid 15 months. Beyond this date, a relationship request will have to be redone in the system.

 

  1. /medical/relation/assertion (National Register Number of the patient is a precondition). In the request options, select the "https" protocol as scheme and select "Application / json" format as return. Then click on "Send Request".

 


  1.      If you are just a patient, go directly to the "/ patient / assertion" method. In the request options, select the protocol "https" as scheme and select an "Application / xml" format as return. Then click on "Send Request".

 

 

Texte de remplacement généré par une machine :
Request 
scheme 
https 
Accept 
application/xml 
securlty 
Bearer 
Only authenticated security options are shown.

 

  1.      If your Bearer Token is valid, a return code will be executed in the Swagger Editor.

 

 

Texte de remplacement généré par une machine :
Response 
SUCCESS 
Rendered 
<saml : Assertion xmlns: saml= "urn : oasis : names : 2. e: assertion " 
Raw 
xmlns="urn :oasis : names :tc : SAML : 2. e:

 

 

  1.                           .You have just recovered the saml token using the Swagger Code Editor.

 

 

Texte de remplacement généré par une machine :
1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
33 
34 
<saml :Assertion 
xmlns : saml=" urn : oasis : names :tc : SAML : 2.0 : assertion " 
xmlns=" urn : oasis : names : tc : SAML : 2 . e: assertion " 
15d5aa81-87da-41fa-822d-2Ø1355f9e2a9" 
<saml: Issuer>Dioss identity provider</saml:lssuer> 
<dsig: Signature xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"> 
<dsig:SignedInf0> 
<dsig:Canonica1izationMethod Algorithm="http://www.w3.org/2001/10/xm1-exc-c14n#"/> 
<dsig:SignatureMethod Algorithm="http://www.w3.org/2001/04/xm1dsig-more#rsa-sha256"/> 
<dsig:Transforms> 
<dsig: Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" 
<dsig: Transform Algorithm="http://www.w3.org/2001/10/xm1-exc-c14n#"/> 
</dsig:Transforms> 
<dsig: DigestMethod Algorithm="http : //www.w3.org/2001/04/xm1enc#sha256"/> 
<dsig:DigestVa1ue> 
c19XN1sGZw2AK8udkHyf2z46xCQSarOfMBeuJ34ZPMØ= 
</dsig:DigestVa1ue> 
</dsig:Reference> 
</dsig : SignedInf0> 
<dsig:SignatureVa1ue> 
F+CXKNØMgQeU/( 
<dsig: Keylnf0> 
<dsig:X509Data> 
<dsig 
</dsig:X509Data> 
<dsig:KeyVa1ue> 
<dsig: RSAKeyVa1ue> 
<dsig : 
<dsig : /dsig: Exponent > 
</dsig: RSAKeyVa1ue> 
</dsig: KeyVa1ue> 
</dsig : Keylnf0> 
</dsig:Signature> 
<sam1:Subject> 
<saml : NamelD Format=" 
urn. 
• oasis. 
• names . 
1: nameid -format : unspecified" 
Filoretta Velica</saml : NamelD> 
>

 

 

  • No labels