Skip to content

Commit 03dccb8

Browse files
committed
* document the skip_subject_confirmation option
1 parent ca8372f commit 03dccb8

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,13 @@ def saml_settings
166166
end
167167
```
168168
169+
Some assertion validations may be skipped by passing parameters to OneLogin::RubySaml::Response.new(). For example, you can skip the Conditions validation or the SubjectConfirmation validations by initializing the response with different options:
170+
171+
```ruby
172+
response = OneLogin::RubySaml::Response.new(params[:SAMLResponse], {skip_conditions: true}) # skips conditions
173+
response = OneLogin::RubySaml::Response.new(params[:SAMLResponse], {skip_subject_confirmation: true}) # skips subject confirmation
174+
```
175+
169176
What's left at this point, is to wrap it all up in a controller and point the initialization and consumption URLs in OneLogin at that. A full controller example could look like this:
170177
171178
```ruby

lib/onelogin/ruby-saml/response.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ class Response < SamlMessage
3636
# @param options [Hash] :settings to provide the OneLogin::RubySaml::Settings object
3737
# Or some options for the response validation process like skip the conditions validation
3838
# with the :skip_conditions, or allow a clock_drift when checking dates with :allowed_clock_drift
39-
# or :matches_request_id that will validate that the response matches the ID of the request.
39+
# or :matches_request_id that will validate that the response matches the ID of the request,
40+
# or skip the subject confirmation validation with the :skip_subject_confirmation option
4041
def initialize(response, options = {})
4142
@errors = []
4243

0 commit comments

Comments
 (0)