Skip to content

cristianc-ty/example_partner_sso

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TrustYou Partner B2B App Integration Example

This script shows an example of how to use the TY Partner B2B App.


Users are able to do the following operations:

  • Generate signed url that allows to access the Partner App from TrustYou.



TABLE OF CONTENTS



SYNOPSIS

$ python test_client.py --consumer_id=test_client --host_url=https://analytics.trustyou.com/kayak/ --hotel_id=42907d1a-91ea-4b43-bc40-8cc54cd92abf --user_name=kayak_test_1



ENVIRONMENT

Install virtualenv if not already installed, for example:

$ sudo apt install virtualenv

Clone repository:

$ git clone [REPOSITORY_URL]

Execute the following in the directory from where you executed the clone:

$ cd example_partner_sso
$ virtualenv venv

Activate the newly created virtual environment:

$ . venv/bin/activate



REQUIREMENTS

Install Python dependencies from the requirements.txt file:

$ pip install -r requirements.txt



CONFIGURATION

Expected SSH keys in the "key_store" folder:

  • priv_consumer_id.pem: private key of consumer, needed for the signed url generation
  • pub_consumer_id.pem: public key of consumer, needed for the signed url verification, not used by the example
  • replace "consumer_id" part with the actual consumer id



EXAMPLE CALL

In order to perform an example call for the Kayak Partner B2B App having the following properties:

  • consumer_id: warning the consumer_id part in the private key file name has to match this, for example: "priv_test_client.pem" corresponds to "test_client" consumer_id
  • host_url: standard url of the app
  • hotel_id: the id of the hotel
  • user_name: the user name from the caller system
python test_client.py --consumer_id=test_client --host_url=https://analytics.trustyou.com/kayak/ --hotel_id=42907d1a-91ea-4b43-bc40-8cc54cd92abf --user_name=kayak_test_1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages