GeoRSS aggregator and Layar augmented reality server
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 

408 строки
11 KiB

  1. # The first thing you need to configure is which modules you need in your app.
  2. # The default is nothing which will include only core features (password encryption, login/logout).
  3. # Available submodules are: :user_activation, :http_basic_auth, :remember_me,
  4. # :reset_password, :session_timeout, :brute_force_protection, :activity_logging, :external
  5. # Rails.application.config.sorcery.submodules = [:remember_me, :reset_password]
  6. Rails.application.config.sorcery.submodules = [:remember_me]
  7. # Here you can configure each submodule's features.
  8. Rails.application.config.sorcery.configure do |config|
  9. # -- core --
  10. # What controller action to call for non-authenticated users. You can also
  11. # override the 'not_authenticated' method of course.
  12. # Default: `:not_authenticated`
  13. #
  14. # config.not_authenticated_action =
  15. # When a non logged in user tries to enter a page that requires login, save
  16. # the URL he wanted to reach, and send him there after login, using 'redirect_back_or_to'.
  17. # Default: `true`
  18. #
  19. # config.save_return_to_url =
  20. # Set domain option for cookies; Useful for remember_me submodule.
  21. # Default: `nil`
  22. #
  23. # config.cookie_domain =
  24. # -- session timeout --
  25. # How long in seconds to keep the session alive.
  26. # Default: `3600`
  27. #
  28. # config.session_timeout =
  29. # Use the last action as the beginning of session timeout.
  30. # Default: `false`
  31. #
  32. # config.session_timeout_from_last_action =
  33. # -- http_basic_auth --
  34. # What realm to display for which controller name. For example {"My App" => "Application"}
  35. # Default: `{"application" => "Application"}`
  36. #
  37. # config.controller_to_realm_map =
  38. # -- activity logging --
  39. # will register the time of last user login, every login.
  40. # Default: `true`
  41. #
  42. # config.register_login_time =
  43. # will register the time of last user logout, every logout.
  44. # Default: `true`
  45. #
  46. # config.register_logout_time =
  47. # will register the time of last user action, every action.
  48. # Default: `true`
  49. #
  50. # config.register_last_activity_time =
  51. # -- external --
  52. # What providers are supported by this app, i.e. [:twitter, :facebook, :github, :google, :liveid] .
  53. # Default: `[]`
  54. #
  55. # config.external_providers =
  56. # You can change it by your local ca_file. i.e. '/etc/pki/tls/certs/ca-bundle.crt'
  57. # Path to ca_file. By default use a internal ca-bundle.crt.
  58. # Default: `'path/to/ca_file'`
  59. #
  60. # config.ca_file =
  61. # Twitter wil not accept any requests nor redirect uri containing localhost,
  62. # make sure you use 0.0.0.0:3000 to access your app in development
  63. #
  64. # config.twitter.key = ""
  65. # config.twitter.secret = ""
  66. # config.twitter.callback_url = "http://0.0.0.0:3000/oauth/callback?provider=twitter"
  67. # config.twitter.user_info_mapping = {:email => "screen_name"}
  68. #
  69. # config.facebook.key = ""
  70. # config.facebook.secret = ""
  71. # config.facebook.callback_url = "http://0.0.0.0:3000/oauth/callback?provider=facebook"
  72. # config.facebook.user_info_mapping = {:email => "name"}
  73. #
  74. # config.github.key = ""
  75. # config.github.secret = ""
  76. # config.github.callback_url = "http://0.0.0.0:3000/oauth/callback?provider=github"
  77. # config.github.user_info_mapping = {:email => "name"}
  78. #
  79. # config.google.key = ""
  80. # config.google.secret = ""
  81. # config.google.callback_url = "http://0.0.0.0:3000/oauth/callback?provider=google"
  82. # config.google.user_info_mapping = {:email => "email", :username => "name"}
  83. #
  84. # To use liveid in development mode you have to replace mydomain.com with
  85. # a valid domain even in development. To use a valid domain in development
  86. # simply add your domain in your /etc/hosts file in front of 127.0.0.1
  87. #
  88. # config.liveid.key = ""
  89. # config.liveid.secret = ""
  90. # config.liveid.callback_url = "http://mydomain.com:3000/oauth/callback?provider=liveid"
  91. # config.liveid.user_info_mapping = {:username => "name"}
  92. # --- user config ---
  93. config.user_config do |user|
  94. # -- core --
  95. # specify username attributes, for example: [:username, :email].
  96. # Default: `[:username]`
  97. #
  98. user.username_attribute_names = [:email]
  99. # change *virtual* password attribute, the one which is used until an encrypted one is generated.
  100. # Default: `:password`
  101. #
  102. # user.password_attribute_name =
  103. # downcase the username before trying to authenticate, default is false
  104. # Default: `false`
  105. #
  106. # user.downcase_username_before_authenticating =
  107. # change default email attribute.
  108. # Default: `:email`
  109. #
  110. # user.email_attribute_name =
  111. # change default crypted_password attribute.
  112. # Default: `:crypted_password`
  113. #
  114. # user.crypted_password_attribute_name =
  115. # what pattern to use to join the password with the salt
  116. # Default: `""`
  117. #
  118. # user.salt_join_token =
  119. # change default salt attribute.
  120. # Default: `:salt`
  121. #
  122. # user.salt_attribute_name =
  123. # how many times to apply encryption to the password.
  124. # Default: `nil`
  125. #
  126. # user.stretches =
  127. # encryption key used to encrypt reversible encryptions such as AES256.
  128. # WARNING: If used for users' passwords, changing this key will leave passwords undecryptable!
  129. # Default: `nil`
  130. #
  131. # user.encryption_key =
  132. # use an external encryption class.
  133. # Default: `nil`
  134. #
  135. # user.custom_encryption_provider =
  136. # encryption algorithm name. See 'encryption_algorithm=' for available options.
  137. # Default: `:bcrypt`
  138. #
  139. # user.encryption_algorithm =
  140. # make this configuration inheritable for subclasses. Useful for ActiveRecord's STI.
  141. # Default: `false`
  142. #
  143. # user.subclasses_inherit_config =
  144. # -- user_activation --
  145. # the attribute name to hold activation state (active/pending).
  146. # Default: `:activation_state`
  147. #
  148. # user.activation_state_attribute_name =
  149. # the attribute name to hold activation code (sent by email).
  150. # Default: `:activation_token`
  151. #
  152. # user.activation_token_attribute_name =
  153. # the attribute name to hold activation code expiration date.
  154. # Default: `:activation_token_expires_at`
  155. #
  156. # user.activation_token_expires_at_attribute_name =
  157. # how many seconds before the activation code expires. nil for never expires.
  158. # Default: `nil`
  159. #
  160. # user.activation_token_expiration_period =
  161. # your mailer class. Required.
  162. # Default: `nil`
  163. #
  164. # user.user_activation_mailer =
  165. # when true sorcery will not automatically
  166. # email activation details and allow you to
  167. # manually handle how and when email is sent.
  168. # Default: `false`
  169. #
  170. # user.activation_mailer_disabled =
  171. # activation needed email method on your mailer class.
  172. # Default: `:activation_needed_email`
  173. #
  174. # user.activation_needed_email_method_name =
  175. # activation success email method on your mailer class.
  176. # Default: `:activation_success_email`
  177. #
  178. # user.activation_success_email_method_name =
  179. # do you want to prevent or allow users that did not activate by email to login?
  180. # Default: `true`
  181. #
  182. # user.prevent_non_active_users_to_login =
  183. # -- reset_password --
  184. # reset password code attribute name.
  185. # Default: `:reset_password_token`
  186. #
  187. # user.reset_password_token_attribute_name =
  188. # expires at attribute name.
  189. # Default: `:reset_password_token_expires_at`
  190. #
  191. # user.reset_password_token_expires_at_attribute_name =
  192. # when was email sent, used for hammering protection.
  193. # Default: `:reset_password_email_sent_at`
  194. #
  195. # user.reset_password_email_sent_at_attribute_name =
  196. # mailer class. Needed.
  197. # Default: `nil`
  198. #
  199. # user.reset_password_mailer =
  200. # reset password email method on your mailer class.
  201. # Default: `:reset_password_email`
  202. #
  203. # user.reset_password_email_method_name =
  204. # when true sorcery will not automatically
  205. # email password reset details and allow you to
  206. # manually handle how and when email is sent
  207. # Default: `false`
  208. #
  209. # user.reset_password_mailer_disabled =
  210. # reset password email
  211. # method on your mailer
  212. # class.
  213. # Default: `:reset_password_email`
  214. #
  215. # user.reset_password_email_method_name =
  216. # how many seconds before the reset request expires. nil for never expires.
  217. # Default: `nil`
  218. #
  219. # user.reset_password_expiration_period =
  220. # hammering protection, how long to wait before allowing another email to be sent.
  221. # Default: `5 * 60`
  222. #
  223. # user.reset_password_time_between_emails =
  224. # -- brute_force_protection --
  225. # Failed logins attribute name.
  226. # Default: `:failed_logins_count`
  227. #
  228. # user.failed_logins_count_attribute_name =
  229. # This field indicates whether user is banned and when it will be active again.
  230. # Default: `:lock_expires_at`
  231. #
  232. # user.lock_expires_at_attribute_name =
  233. # How many failed logins allowed.
  234. # Default: `50`
  235. #
  236. # user.consecutive_login_retries_amount_limit =
  237. # How long the user should be banned. in seconds. 0 for permanent.
  238. # Default: `60 * 60`
  239. #
  240. # user.login_lock_time_period =
  241. # Unlock token attribute name
  242. # Default: `:unlock_token`
  243. #
  244. # user.unlock_token_attribute_name =
  245. # Unlock token mailer method
  246. # Default: `:send_unlock_token_email`
  247. #
  248. # user.unlock_token_email_method_name =
  249. # when true sorcery will not automatically
  250. # send email with unlock token
  251. # Default: `false`
  252. #
  253. # user.unlock_token_mailer_disabled = true
  254. # Unlock token mailer class
  255. # Default: `nil`
  256. #
  257. # user.unlock_token_mailer = UserMailer
  258. # -- activity logging --
  259. # Last login attribute name.
  260. # Default: `:last_login_at`
  261. #
  262. # user.last_login_at_attribute_name =
  263. # Last logout attribute name.
  264. # Default: `:last_logout_at`
  265. #
  266. # user.last_logout_at_attribute_name =
  267. # Last activity attribute name.
  268. # Default: `:last_activity_at`
  269. #
  270. # user.last_activity_at_attribute_name =
  271. # How long since last activity is he user defined logged out?
  272. # Default: `10 * 60`
  273. #
  274. # user.activity_timeout =
  275. # -- external --
  276. # Class which holds the various external provider data for this user.
  277. # Default: `nil`
  278. #
  279. # user.authentications_class =
  280. # User's identifier in authentications class.
  281. # Default: `:user_id`
  282. #
  283. # user.authentications_user_id_attribute_name =
  284. # Provider's identifier in authentications class.
  285. # Default: `:provider`
  286. #
  287. # user.provider_attribute_name =
  288. # User's external unique identifier in authentications class.
  289. # Default: `:uid`
  290. #
  291. # user.provider_uid_attribute_name =
  292. end
  293. # This line must come after the 'user config' block.
  294. # Define which model authenticates with sorcery.
  295. config.user_class = "User"
  296. end