Class: OmniAuth::Strategies::Crowd::CrowdValidator
- Inherits:
-
Object
- Object
- OmniAuth::Strategies::Crowd::CrowdValidator
- Defined in:
- lib/omniauth/strategies/crowd/crowd_validator.rb
Constant Summary collapse
- SESSION_REQUEST_BODY =
"<authentication-context>\n <username>%s</username>\n <password>%s</password>\n</authentication-context>\n".strip
- AUTHENTICATION_REQUEST_BODY =
"<password><value>%s</value></password>"
Instance Method Summary collapse
-
#initialize(configuration, username, password) ⇒ CrowdValidator
constructor
A new instance of CrowdValidator.
- #user_info ⇒ Object
Constructor Details
#initialize(configuration, username, password) ⇒ CrowdValidator
Returns a new instance of CrowdValidator.
16 17 18 19 20 21 |
# File 'lib/omniauth/strategies/crowd/crowd_validator.rb', line 16 def initialize(configuration, username, password) @configuration, @username, @password = configuration, username, password @authentiction_uri = URI.parse(@configuration.authentication_url(@username)) @session_uri = URI.parse(@configuration.session_url) if @configuration.use_sessions @user_group_uri = @configuration.include_users_groups? ? URI.parse(@configuration.user_group_url(@username)) : nil end |
Instance Method Details
#user_info ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/omniauth/strategies/crowd/crowd_validator.rb', line 23 def user_info user_info_hash = retrieve_user_info! if user_info_hash && @configuration.include_users_groups? user_info_hash = add_user_groups!(user_info_hash) else user_info_hash end if user_info_hash && @configuration.use_sessions? user_info_hash = add_session!(user_info_hash) end user_info_hash end |