Authentication

API

The API uses Basic Auth for Authentication. This means you need to add a Authorization header to each of your calls to the API. The value for this header is a base64 encoded version of your_user_email:your_password

To get a valid token, do the following in the Rails console

user = ApiUser.create(name: "Your Name", email: "you@mychannel.com", password: "supersecret")
token = Base64.encode64 "#{user.email}:#{user.password}"

Then test if it works using curl (you should get some JSON output)

curl -H "Authorization: Basic YOUR_TOKEN" http://api.mychannels.localhost/v1/shows/54

VMS

VMS works with both email+password and OneLogin authentication.

OneLogin is a Single Sign On (SSO) solution used by the Persgroep to centralise user management and authentication. The traditionally existing email+password authentication is still in place to support non Persgroep users.

email+password authentication works with the devise ruby gem and OneLogin works using a SAML integration found in the Onelogin module and the OneloginController.

A OneLogin integration is available for development, preview and production.

All 3 OneLogin environments separately configured by the Persgroep and the Persgroep user needs to be authorized for the specific environments when the want to use it. Contact Wim Leyssens from the strIDe squad to add users to development or preview for testing purposes.

To create a traditional user, you will need Rails console again

VmsUser.create(name: "Your Name", email: "you@mychannel.com", password: "supersecret", organisation_id: 2, role: "admin")

You can now log in on the log in page of the VMS.

Last Updated: 3/20/2019, 3:33:45 PM