Commit 5191c41

mo <mo@mokhan.ca>
2017-11-06 03:24:25
update user to return proper nameid.
1 parent 4f915a8
Changed files (1)
app
models
app/models/user.rb
@@ -4,6 +4,14 @@ class User < ApplicationRecord
     self.uuid = SecureRandom.uuid unless self.uuid
   end
 
+  def name_id_for(request)
+    if Saml::Kit::Namespaces::PERSISTENT == request.name_id_format
+      uuid
+    else
+      email
+    end
+  end
+
   def assertion_attributes_for(request)
     {
       id: uuid,