Welcome to the OneLogin Sample

Acknowledgments

This sample relies heavily on sample code provided by OneLogin.

Purpose

The purpose of this sample is to demonstrate how SAML authentication can be added to a ServiceAPI application such as WebDrawer or the Web Client. Given that HPRM does not yet have an App on the OneLogin portal the purpose of this sample is not to support production use of OneLogin.

Pre-Requisites

To use this you must have configured a SAML Test Connector with OneLogin.

Using the sample

To use this sample:

  1. Create a OneLogin account, configure a SAML Test Connector and add some users.
  2. Add the appSettings found in sample.web.config to your web.config
  3. Set the Authentication in the IIS Web Site to Anonymous.
  4. Build the OneLoginPlugin project
  5. Copy OneLoginPlugin.DLL to the bin folder of the Web Client
  6. edit hptrim.config (or hprmServiceAPI.config for the Web Client) and add the plugin (see example below.)

Sample Plugin in hptrim.config

<pluginassemblies>
    <add name="OneLoginPlugin" />
</pluginassemblies>

Sample SAML Test Connector Configuration

The SAML Test Connector Configuration will contain values similar to these:

Property Value
Relay State https://mydomain.info/HPRMWebDrawer
Recipient https://mydomain.info/HPRMWebDrawer
ACS URL Validator A regular expression to ensure that only your assertion consumer URL is accepted. (the RegEx .* will accept any URL).
ACS URL https://mydomain.info/HPRMWebDrawer/auth/saml
Single Logout URL https://mydomain.info/HPRMWebDrawer/SAMLLogout