Class: OmniAuth::SAML::MultiProvider::Handler
- Inherits:
-
Object
- Object
- OmniAuth::SAML::MultiProvider::Handler
- Defined in:
- lib/omniauth/saml/multi_provider/handler.rb
Instance Attribute Summary collapse
-
#identity_provider_id_regex ⇒ Object
readonly
Returns the value of attribute identity_provider_id_regex.
-
#path_prefix ⇒ Object
readonly
Returns the value of attribute path_prefix.
Instance Method Summary collapse
-
#initialize(path_prefix: OmniAuth.config.path_prefix, identity_provider_id_regex: /\w+/, &identity_provider_options_generator) ⇒ Handler
constructor
A new instance of Handler.
- #provider_options ⇒ Object
Constructor Details
#initialize(path_prefix: OmniAuth.config.path_prefix, identity_provider_id_regex: /\w+/, &identity_provider_options_generator) ⇒ Handler
Returns a new instance of Handler.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/omniauth/saml/multi_provider/handler.rb', line 10 def initialize(path_prefix: OmniAuth.config.path_prefix, identity_provider_id_regex: /\w+/, &) raise 'Missing provider options generator block' unless block_given? @path_prefix = path_prefix @identity_provider_id_regex = identity_provider_id_regex @identity_provider_options_generator = # Eagerly compute these since lazy evaluation will not be threadsafe @provider_path_prefix = "#{@path_prefix}/saml" @saml_path_regex = /^#{@provider_path_prefix}\/(?<identity_provider_id>#{@identity_provider_id_regex})/ @request_path_regex = /#{saml_path_regex}\/?$/ @callback_path_regex = /#{saml_path_regex}\/callback\/?$/ end |
Instance Attribute Details
#identity_provider_id_regex ⇒ Object (readonly)
Returns the value of attribute identity_provider_id_regex.
8 9 10 |
# File 'lib/omniauth/saml/multi_provider/handler.rb', line 8 def identity_provider_id_regex @identity_provider_id_regex end |
#path_prefix ⇒ Object (readonly)
Returns the value of attribute path_prefix.
8 9 10 |
# File 'lib/omniauth/saml/multi_provider/handler.rb', line 8 def path_prefix @path_prefix end |
Instance Method Details
#provider_options ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/omniauth/saml/multi_provider/handler.rb', line 25 def { request_path: method(:request_path?), callback_path: method(:callback_path?), setup: method(:setup) } end |