Module: Devise

Defined in:
lib/devise_cas_authenticatable.rb,
lib/devise_cas_authenticatable/model.rb,
lib/devise_cas_authenticatable/schema.rb,
lib/devise_cas_authenticatable/strategy.rb

Defined Under Namespace

Modules: Models, Schema, Strategies Classes: CasSessionsController

Constant Summary collapse

@@cas_base_url =

The base URL of the CAS server. For example, cas.example.com. Specifying this is mandatory.

nil
@@cas_login_url =

The login URL of the CAS server. If undefined, will default based on cas_base_url.

nil
@@cas_logout_url =

The login URL of the CAS server. If undefined, will default based on cas_base_url.

nil
@@cas_validate_url =

The login URL of the CAS server. If undefined, will default based on cas_base_url.

nil
@@cas_enable_single_sign_out =

Should devise_cas_authenticatable enable single-sign-out? Requires use of a supported session_store. Currently supports active_record or redis. False by default.

false
@@cas_single_sign_out_mapping_strategy =

What strategy should single sign out use for tracking token->session ID mapping. :rails_cache by default.

:rails_cache
@@cas_create_user =

Should devise_cas_authenticatable attempt to create new user records for unknown usernames? True by default.

true
@@cas_username_column =

The model attribute used for query conditions. Should be the same as the rubycas-server username_column. :username by default

:username
@@cas_destination_logout_param_name =

Name of the parameter passed in the logout query

nil

Class Method Summary collapse

Class Method Details

.cas_clientObject

Return a CASClient::Client instance based on configuration parameters.



72
73
74
75
76
77
78
79
80
81
# File 'lib/devise_cas_authenticatable.rb', line 72

def self.cas_client
  @@cas_client ||= CASClient::Client.new(
      :cas_destination_logout_param_name => @@cas_destination_logout_param_name,
      :cas_base_url => @@cas_base_url,
      :login_url => @@cas_login_url,
      :logout_url => @@cas_logout_url,
      :validate_url => @@cas_validate_url,
      :enable_single_sign_out => @@cas_enable_single_sign_out
    )
end

.cas_create_user?Boolean

Returns:

  • (Boolean)


67
68
69
# File 'lib/devise_cas_authenticatable.rb', line 67

def self.cas_create_user?
  cas_create_user
end

.cas_service_url(base_url, mapping) ⇒ Object



83
84
85
# File 'lib/devise_cas_authenticatable.rb', line 83

def self.cas_service_url(base_url, mapping)
  cas_action_url(base_url, mapping, "service")
end

.cas_unregistered_url(base_url, mapping) ⇒ Object



87
88
89
# File 'lib/devise_cas_authenticatable.rb', line 87

def self.cas_unregistered_url(base_url, mapping)
  cas_action_url(base_url, mapping, "unregistered")
end