You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+44-11Lines changed: 44 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,37 @@ The Ruby SAML library is for implementing the client side of a SAML authorizatio
9
9
10
10
SAML authorization is a two step process and you are expected to implement support for both.
11
11
12
-
## The initialization phase
12
+
## Getting Started
13
+
In order to use the toolkit you will need to install the gem (either manually or using Bundler), and require the library in your Ruby application:
14
+
15
+
Using `Gemfile`
16
+
17
+
```ruby
18
+
# latest stable
19
+
gem 'ruby-saml', '~> 0.8.1'
20
+
21
+
# or track master for bleeding-edge
22
+
gem 'ruby-saml', git:'onelogin/ruby-saml'
23
+
```
24
+
25
+
Using Bundler
26
+
27
+
```sh
28
+
gem install ruby-saml
29
+
```
30
+
31
+
When requiring the gem, you can add the whole toolkit
32
+
```ruby
33
+
require'onelogin/ruby-saml'
34
+
```
35
+
36
+
or just the required components individually:
37
+
38
+
```ruby
39
+
require'onelogin/ruby-saml/authrequest'
40
+
```
41
+
42
+
## The Initialization Phase
13
43
14
44
This is the first request you will get from the identity provider. It will hit your application at a specific URL (that you've announced as being your SAML initialization point). The response to this initialization, is a redirect back to the identity provider, which can look something like this (ignore the saml_settings method call for now):
To form a trusted pair relationship with the IdP, the SP (you) need to provide metadata XML
110
143
to the IdP for various good reasons. (Caching, certificate lookups, relaying party permissions, etc)
111
144
112
-
The class OneLogin::RubySaml::Metadata takes care of this by reading the Settings and returning XML. All
113
-
you have to do is add a controller to return the data, then give this URL to the IdP administrator.
145
+
The class `OneLogin::RubySaml::Metadata` takes care of this by reading the Settings and returning XML. All you have to do is add a controller to return the data, then give this URL to the IdP administrator.
146
+
114
147
The metdata will be polled by the IdP every few minutes, so updating your settings should propagate
Make sure to keep the value as comfortably small as possible to keep security risks to a minimum.
141
174
142
-
## Note on Patches/Pull Requests
175
+
## Adding Features, Pull Requests
143
176
144
-
* Fork the project.
145
-
* Make your feature addition or bug fix.
146
-
* Add tests for it. This is important so I don't break it in a
147
-
future version unintentionally.
148
-
*Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
149
-
*Send me a pull request. Bonus points for topic branches.
177
+
* Fork the repository
178
+
* Make your feature addition or bug fix
179
+
* Add tests for your new features. This is important so we don't break any features in a future version unintentionally.
180
+
* Ensure all tests pass.
181
+
*Do not change rakefile, version, or history.
182
+
*Open a pull request, following [this template](https://gist.github.com/Lordnibbler/11002759).
0 commit comments