hampei/omniauth-saml-rmunify — pull request #2 by TheHelmsman (2014-11-26 11:06:54+00:00)
Title: License exception fix when info is not available

Fellow Hampei,

I’ve fixed an exception in license parse logic which happens when information on AppLicense (that is optional and not always available) makes your gem useless.

According to the information on RM Unify Dashboard for SSO, the following parameters are optional and not always available on callback page:

AppLicence	http://schemas.rm.com/identity/claims/applicence
AppEstablishmentKey	http://schemas.rm.com/identity/claims/appestablishmentkey
AppUserId	http://schemas.rm.com/identity/claims/appuserid

As a result of this, Rails raises exception on line 43 of your code:
licence = Hash[licence_str[1..-2].split('|').map{|kv|

This commit fixes it.

If you need more information or full log that contains exception, feel free to drop me a line.

P.S. This code is probably not 100% perfect and I assume that there would be a more elegant solution. I'm relatively new to Ruby On Rails and study it ATM.

Thanks!