Class: Nyauth::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/nyauth/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/nyauth/configuration.rb', line 16

def initialize
   = nil
  @redirect_path_after_sign_out = nil
  @redirect_path_after_registration = nil
  @redirect_path_after_create_request_confirmation = nil
  @redirect_path_after_update_confirmation = nil
  @redirect_path_after_reset_password_request = nil
  @redirect_path_after_reset_password = nil
  @redirect_path_after_update_password = nil
  @password_minium = 8
  @password_digest_stretches = 1000
  @redirect_path_block = Proc.new {}
end

Instance Attribute Details

#password_digest_stretchesObject

Returns the value of attribute password_digest_stretches.



3
4
5
# File 'lib/nyauth/configuration.rb', line 3

def password_digest_stretches
  @password_digest_stretches
end

#password_miniumObject

Returns the value of attribute password_minium.



3
4
5
# File 'lib/nyauth/configuration.rb', line 3

def password_minium
  @password_minium
end

#redirect_path_after_create_request_confirmationObject

Returns the value of attribute redirect_path_after_create_request_confirmation.



3
4
5
# File 'lib/nyauth/configuration.rb', line 3

def redirect_path_after_create_request_confirmation
  @redirect_path_after_create_request_confirmation
end

#redirect_path_after_registrationObject

Returns the value of attribute redirect_path_after_registration.



3
4
5
# File 'lib/nyauth/configuration.rb', line 3

def redirect_path_after_registration
  @redirect_path_after_registration
end

#redirect_path_after_reset_passwordObject

Returns the value of attribute redirect_path_after_reset_password.



3
4
5
# File 'lib/nyauth/configuration.rb', line 3

def redirect_path_after_reset_password
  @redirect_path_after_reset_password
end

#redirect_path_after_reset_password_requestObject

Returns the value of attribute redirect_path_after_reset_password_request.



3
4
5
# File 'lib/nyauth/configuration.rb', line 3

def redirect_path_after_reset_password_request
  @redirect_path_after_reset_password_request
end

#redirect_path_after_sign_inObject

Returns the value of attribute redirect_path_after_sign_in.



3
4
5
# File 'lib/nyauth/configuration.rb', line 3

def 
  
end

#redirect_path_after_sign_outObject

Returns the value of attribute redirect_path_after_sign_out.



3
4
5
# File 'lib/nyauth/configuration.rb', line 3

def redirect_path_after_sign_out
  @redirect_path_after_sign_out
end

#redirect_path_after_update_confirmationObject

Returns the value of attribute redirect_path_after_update_confirmation.



3
4
5
# File 'lib/nyauth/configuration.rb', line 3

def redirect_path_after_update_confirmation
  @redirect_path_after_update_confirmation
end

#redirect_path_after_update_passwordObject

Returns the value of attribute redirect_path_after_update_password.



3
4
5
# File 'lib/nyauth/configuration.rb', line 3

def redirect_path_after_update_password
  @redirect_path_after_update_password
end

#redirect_path_blockObject

Returns the value of attribute redirect_path_block.



3
4
5
# File 'lib/nyauth/configuration.rb', line 3

def redirect_path_block
  @redirect_path_block
end

Instance Method Details

#redirect_path(&block) ⇒ Object



30
31
32
# File 'lib/nyauth/configuration.rb', line 30

def redirect_path(&block)
  @redirect_path_block = block
end

#setup_redirect_pathObject



34
35
36
37
38
39
# File 'lib/nyauth/configuration.rb', line 34

def setup_redirect_path
  UrlHelper.class_eval do
    include Rails.application.routes.url_helpers
  end
  @redirect_path_block.call(UrlHelper.new)
end