File tree 5 files changed +23
-13
lines changed
5 files changed +23
-13
lines changed Original file line number Diff line number Diff line change 8
8
PATH
9
9
remote: .
10
10
specs:
11
- fake_idp (0.3.0 )
12
- builder
11
+ fake_idp (0.4.0 )
13
12
ruby-saml-idp
14
13
sinatra (~> 2.0.0 )
15
14
16
15
GEM
17
16
remote: https://rubygems.org/
18
17
specs:
19
- builder (3.2.3 )
20
18
diff-lcs (1.2.5 )
21
19
dotenv (1.0.2 )
22
20
macaddr (1.7.1 )
@@ -61,4 +59,4 @@ DEPENDENCIES
61
59
ruby-saml-idp !
62
60
63
61
BUNDLED WITH
64
- 1.16.6
62
+ 1.17.3
Original file line number Diff line number Diff line change @@ -40,15 +40,17 @@ Then navigate to `http://localhost:9292/saml/auth` to begin making your SAML req
40
40
41
41
## Running in Test
42
42
43
- If you are using this gem to provide a Fake IDP server in a test suite, add the gem
44
- to the Gemfile:
43
+ ### Gemfile
44
+
45
+ If you are using this gem to provide a Fake IDP server in a test suite, add the gem to the Gemfile:
45
46
46
47
``` ruby
47
48
gem ' fake_idp' , github: ' healthify/fake_idp'
48
49
```
49
50
50
- You can set the relevant variables in a configuration block if they aren't provided
51
- as environment variables. For example:
51
+ ### Configuration
52
+
53
+ You can set the relevant variables in a configuration block if they aren't provided as environment variables. For example:
52
54
53
55
``` ruby
54
56
FakeIdp .configure do |config |
@@ -59,10 +61,21 @@ FakeIdp.configure do |config|
59
61
config.idp_certificate = " YOUR CERT HERE"
60
62
config.idp_secret_key = " YOUR KEY HERE"
61
63
config.algorithm = :sha512
64
+ config.additional_attributes = { custom_saml_attr: " DELIVERED_IN_ASSERTION" }
62
65
end
63
66
```
64
67
65
- And then use Capybara Discoball to spin it up in a test:
68
+ #### Resetting Configuration
69
+
70
+ If you ever want to reset your FakeIdp configuration (e.g. between test specs), you can use the following:
71
+
72
+ ``` ruby
73
+ FakeIdp .reset!
74
+ ```
75
+
76
+ ### Use
77
+
78
+ You can use Capybara Discoball to spin ` FakeIdp::Application ` up in a test:
66
79
67
80
``` ruby
68
81
require ' fake_idp'
Original file line number Diff line number Diff line change @@ -10,8 +10,9 @@ Gem::Specification.new do |spec|
10
10
"Shelby Switzer" ,
11
11
"Tyler Willingham" ,
12
12
"Robyn-Dale Samuda" ,
13
+ "Chet Bortz" ,
13
14
]
14
- spec . email = [ "shelby @healthify.us" ]
15
+ spec . email = [ "engineering @healthify.us" ]
15
16
16
17
spec . summary = 'Fake IDP to test SAML authentication'
17
18
spec . license = "MIT"
@@ -35,5 +36,4 @@ Gem::Specification.new do |spec|
35
36
spec . add_development_dependency "dotenv" , "~> 1.0"
36
37
spec . add_runtime_dependency "sinatra" , "~> 2.0.0"
37
38
spec . add_runtime_dependency "ruby-saml-idp"
38
- spec . add_runtime_dependency "builder"
39
39
end
Original file line number Diff line number Diff line change 1
1
require 'sinatra/base'
2
2
require 'ruby-saml-idp'
3
- require 'builder'
4
3
require 'zlib'
5
4
require 'tilt/erb'
6
5
require 'fake_idp/configuration'
Original file line number Diff line number Diff line change 1
1
module FakeIdp
2
- VERSION = "0.3 .0"
2
+ VERSION = "0.4 .0"
3
3
end
You can’t perform that action at this time.
0 commit comments