{"info":{"_postman_id":"46a42be2-1dd9-463f-90ce-8013256f617d","name":"Travellink API – SSO - Documentation","description":"<html><head></head><body><p>SSO<br>Developer collections<br>Questions and suggestions: <a href=\"null\">api.travellink@wooba.com.br</a> .</p>\n<p><strong>What is SSO? | How does single sign-on work?</strong></p>\n<p>Single Sign-On (SSO) is an important cloud security technology that reduces all user application logins to one login for added security and convenience.</p>\n<p><strong>What is Single Sign-On (SSO)?</strong></p>\n<p>Single sign-on (SSO) is a technology that combines the login pages of multiple different applications into a single page. With SSO, the user needs to enter his login credentials (username, password etc.) only one time on a single page to access all of his SaaS applications.</p>\n<h1 id=\"to-perform-the-initial-settings-it-is-necessary-to-follow-these-steps\"><strong>To perform the initial settings, it is necessary to follow these steps:</strong></h1>\n<p>To perform the initial settings, it is necessary to follow these steps:</p>\n<h3 id=\"step-1\"><strong>Step 1</strong></h3>\n<p>The developer must inform the Licensee/Operator of the URL Redirect.</p>\n<h3 id=\"step-2\">Step 2</h3>\n<p>The Licensee/Operator will access the Acess Portal:<br><a href=\"null\">https://operadorateste.com.br/AccessPortal/</a></p>\n<p>Content <strong>Travellink API &gt; Credential</strong>&gt; Select:</p>\n<p><strong>Basic Data:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><br>Tipo de API  <br>  <br>ID  <br>  <br>Nome  <br>  <br>Client ID  <br>  <br>Client Secret  <br>  <br>Status  <br>  <br>URL Redirecionamento  <br>  <br></th>\n<th><br>Travellink_auth Credential  <br>  <br>ID is generated automatically  <br>  <br>Reference name, for example: Developer SSO Test  <br>  <br>Information generated automatically  <br>  <br>Information generated automatically  <br>  <br>Keep Active  <br>  <br>Information that will be reported by the developer.  <br>(Note: When this field is filled, Travellink will validate if the REDIRECT_URL is = field value.  <br>If it is not filled, it will release to any REDIRECT_URL.  <br>  <br></th>\n</tr>\n</thead>\n<tbody>\n</tbody>\n</table>\n</div><p><strong>Context :</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><br>Unidade  <br>  <br>Agência  <br>  <br>Cliente  <br>  <br>  <br></th>\n<th><br>By registering the credential per unit, agency and client, Travellink will respect the same hierarchy.  <br>  <br>  <br>  <br>  <br>  <br>  <br>  <br></th>\n</tr>\n</thead>\n<tbody>\n</tbody>\n</table>\n</div><p><strong>Passo 3</strong></p>\n<p>The Licensee/Operator must inform the Developer of the data from the Client ID and Client Secret fields.</p>\n<img src=\"https://content.pstmn.io/915e625c-9cc4-4cc2-b08b-5fb53ea1cc93/Q2FwdHVyYSBkZSB0ZWxhIDIwMjMtMDctMjEgMTYwODU4LmpwZw==\">\n\n<h2 id=\"registering-the-authentication-api\"><strong>Registering the authentication API</strong></h2>\n<p><strong>Autentication</strong></p>\n<h3 id=\"step-1-1\">Step 1</h3>\n<p>The developer must include the button on the authentication page by following the example template:</p>\n<p><a href=\"null\">https://wooba-sandbox.travellink.com.br/Agencias30/auth/authorize?client_id={CLIENT_ID}&amp;response_type=code&amp;scope=openid&amp;redirect_uri={REDIRECT_URI}</a></p>\n<img src=\"https://content.pstmn.io/0b01c3c2-fa4a-47fe-8434-59bb0d5ac5d1/Q2FwdHVyYSBkZSB0ZWxhIDIwMjMtMDctMjEgMTYxMzE5LmpwZw==\">\n\n<p><strong>Note:</strong> The Client ID information and the REDIRECT URL are required parameters that must be entered in the URL button .</p>\n<h3 id=\"step-2-1\">Step 2</h3>\n<p>When the user authenticates in Travellink, he will be redirected to the address at REDIRECT_URL, and the authentication token will be sent as <strong>CODE</strong> parameter.</p>\n<p>MicrosoftInternetExplorer402DocumentNotSpecified7.8 磅Normal0</p>\n<p><strong>Model of redirection:</strong></p>\n<p><a href=\"null\">{REDIRECT_URI</a>}? code={CODE}</p>\n<p><a href=\"null\">https://mydomain.com.br?code={CODE</a>}</p>\n<p>After logging in Travellink you will receive the answer below:</p>\n<p><strong>Step 3</strong><br>After obtaining the CODE value the developer should make a Post call to get the <strong>ID_Token</strong></p>\n<p><strong>Post Example:</strong><br>POST /Agencies30/auth/authorize/token HTTP/1.1<br>Host: wooba-sandbox.com.br<br>Authorization: Basic e0NMSUVOVF9JRH06e0NMSUVOVF9TRUNSRVR9  </p>\n<p>Content-Type: application/json:</p>\n<p>{<br>\"grant_type\": \"authorization_code\",<br>\"redirect_uri\": \"{{redirect_uri}}\",<br>\"client_id\": \"{{client_id}}\",<br>\"client_secret\": \"{{client_secret}}\",<br>\"code\": \"{{code}}\"<br>}</p>\n<img src=\"https://content.pstmn.io/7463764f-3762-4bfe-9c2d-3b84b9fd8d2c/Q2FwdHVyYSBkZSB0ZWxhIDIwMjMtMDctMjEgMTYxNTQ3LmpwZw==\" width=\"413\" height=\"197\">\n\n<p><strong>Exemplo www-form-urlencoded:</strong></p>\n<p><strong>The application/x-www-form-urlencoded format is also accepted</strong></p>\n<p>StartFragmeThe application/x-www-form-urlencoded format is also accepted:</p>\n<p>POST /Agencias30/auth/authorize/token HTTP/1.1<br>Host: wooba-sandbox.com.br<br>Authorization: Basic e0NMSUVOVF9JRH06e0NMSUVOVF9TRUNSRVR9</p>\n<p>Content-Type: application/x-www-form-urlencoded<br>code={CODE}&amp;client_id={CLIENT_ID}&amp;client_secret={CLIENT_SECRET}&amp;grant_type=authorization_code&amp;redirect_uri={REDIRECT_URI}</p>\n<img src=\"https://content.pstmn.io/817e0ce9-6b54-4a7b-ac4a-22a8c06a8f87/Q2FwdHVyYSBkZSB0ZWxhIDIwMjMtMDctMjEgMTYxNjIzLmpwZw==\">\n\n<p>Note: Authorization <strong>{CLIENT_ID}:{CLIENT_SECRET} is encoded into Base64</strong></p>\n<p><strong>Model of response:</strong></p>\n<p>{<br>\"token_type\": \"Bearer\",<br>\"expires_in\": 3600,<br>\"id_token\": \"token_jwt\"<br>}</p>\n<img src=\"https://content.pstmn.io/4d1fad7b-27d8-4271-a7f3-3fd34ec24caa/Q2FwdHVyYSBkZSB0ZWxhIDIwMjMtMDctMjEgMTYxNjQ0LmpwZw==\" width=\"261\" height=\"136\">\n\n<p><strong>Getting the id_token</strong></p>\n<img src=\"https://content.pstmn.io/3a1689f6-4a6c-4a07-8996-45e1b0413d5c/Q2FwdHVyYSBkZSB0ZWxhIDIwMjMtMDctMjEgMTYxNzExLmpwZw==\">\n\n<p>**User Claims :**<strong>Data that is in the Token ID:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><br>sub  <br>  <br>email  <br>  <br>name  <br>  <br>role  <br>  <br>useremails  <br>  <br>phone_number  <br>  <br></th>\n<th><br>User Id at Travellink  <br>  <br>User email  <br>  <br>Full name of the user  <br>  <br>Access type of the user – Internal or External  <br>  <br>More than one email per user, these emails are separated by;  <br>  <br>It will only be sent if the user registration has the phone number registered.  <br>  <br></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td></td>\n<td></td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Claims da Agência:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><br>agencyid  <br>  <br>agencybackofficecode  <br>  <br>agencydocument  <br>  <br>ragencyname  <br>  <br>agencybusinessname  <br>  <br>agencylogoUrl  <br>  <br>agencyaddress1  <br>  <br>agencyaddress2  <br>  <br>agencyneighborhood  <br>  <br>agencycity  <br>  <br>agencyzipCode  <br>  <br>agencystate  <br>  <br>agencycountry  <br>  <br>agencyphonegeneral  <br>  <br>agencyphoneemergency  <br>  <br></th>\n<th><br>Agency Id at Travellink  <br>  <br>Backoffice Code (IdERP)  <br>  <br>Agency EIN  <br>  <br>Corporate Name of the Agency  <br>  <br>Trade Name of the Agency  <br>  <br>Agency Logotype (image)  <br>  <br>Address  <br>  <br>Address 2  <br>  <br>District  <br>  <br>City  <br>  <br>Zip code  <br>  <br>State  <br>  <br>Country  <br>  <br>Phone  <br>  <br>Phone/ Emergency contact number  <br>  <br></th>\n</tr>\n</thead>\n<tbody>\n</tbody>\n</table>\n</div><p><strong>Step 4</strong><br>Optional (The developer may use the website JWT.IO to validate the IDtoken.</p>\n<h4 id=\"id_token-validation\"><strong>Id_Token Validation:</strong></h4>\n<img src=\"https://content.pstmn.io/4a7826d8-6298-4e19-8048-80ee96db3d2a/Q2FwdHVyYSBkZSB0ZWxhIDIwMjMtMDctMjEgMTYxNzQwLmpwZw==\">\n\n<p><strong>Access code of the Developer</strong></p>\n<p><strong>Documentation Link of the openId:</strong></p>\n<p><a href=\"null\">https://openid.net/specs/openid-connect-core-1_0.html#CodeFlowAuth</a></p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"To perform the initial settings, it is necessary to follow these steps:","slug":"to-perform-the-initial-settings-it-is-necessary-to-follow-these-steps"}],"owner":"24548172","collectionId":"46a42be2-1dd9-463f-90ce-8013256f617d","publishedId":"2s9XxvTEhD","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2023-08-01T14:57:07.000Z"},"item":[],"event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":[""],"id":"46a19c10-f0a5-4a9d-aae7-72712196dac6"}},{"listen":"test","script":{"type":"text/javascript","exec":[""],"id":"29870c78-c82e-44c5-9771-879d91520b6c"}}],"variable":[{"key":"developer-token","value":"developer-token","type":"string"},{"key":"developer-access-code","value":"developer-access-code","type":"string"},{"key":"URL","value":"URL","type":"string"},{"key":"identifier","value":"Login","type":"string"},{"key":"password","value":"pass","type":"string"}]}