summaryrefslogtreecommitdiff
path: root/app/models/user.rb
blob: f9baa413b207ae319fc8a718b3b09dcbdb9e148c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
class User
  attr_reader :id, :email, :attributes

  def initialize(attributes)
    @id = attributes[:id]
    @email = attributes[:email]
    @attributes = attributes
  end

  def name_id_for(name_id_format)
    if Saml::Kit::Namespaces::PERSISTENT == name_id_format
      id
    else
      email
    end
  end
end