summaryrefslogtreecommitdiff
path: root/bin/idp
diff options
context:
space:
mode:
Diffstat (limited to 'bin/idp')
-rwxr-xr-xbin/idp10
1 files changed, 3 insertions, 7 deletions
diff --git a/bin/idp b/bin/idp
index 81e5ffe..8d13411 100755
--- a/bin/idp
+++ b/bin/idp
@@ -6,6 +6,7 @@ gemfile do
source "https://rubygems.org"
gem "bcrypt", "~> 3.1"
+ gem "csv", "~> 3.1"
gem "declarative_policy", "~> 1.0"
gem "erb", "~> 4.0"
gem "globalid", "~> 1.0"
@@ -61,13 +62,8 @@ module Authn
class << self
def all
- @all ||= 10.times.map do |n|
- new(
- id: SecureRandom.uuid,
- username: "username#{n}",
- email: "username#{n}@example.org",
- password_digest: password_digest = ::BCrypt::Password.create("password#{n}")
- )
+ @all ||= ::CSV.read(File.join(__dir__, "../db/users.csv"), headers: true).map do |row|
+ new(row.to_h.transform_keys(&:to_sym))
end
end