GeoRSS aggregator and Layar augmented reality server
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 

409 lignes
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, :reset_password]
  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 = UserMailer
  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. # how many seconds before the reset request expires. nil for never expires.
  210. # Default: `nil`
  211. #
  212. # user.reset_password_expiration_period =
  213. # hammering protection, how long to wait before allowing another email to be sent.
  214. # Default: `5 * 60`
  215. #
  216. user.reset_password_time_between_emails = 1 * 60
  217. # -- brute_force_protection --
  218. # Failed logins attribute name.
  219. # Default: `:failed_logins_count`
  220. #
  221. # user.failed_logins_count_attribute_name =
  222. # This field indicates whether user is banned and when it will be active again.
  223. # Default: `:lock_expires_at`
  224. #
  225. # user.lock_expires_at_attribute_name =
  226. # How many failed logins allowed.
  227. # Default: `50`
  228. #
  229. # user.consecutive_login_retries_amount_limit =
  230. # How long the user should be banned. in seconds. 0 for permanent.
  231. # Default: `60 * 60`
  232. #
  233. # user.login_lock_time_period =
  234. # Unlock token attribute name
  235. # Default: `:unlock_token`
  236. #
  237. # user.unlock_token_attribute_name =
  238. # Unlock token mailer method
  239. # Default: `:send_unlock_token_email`
  240. #
  241. # user.unlock_token_email_method_name =
  242. # when true sorcery will not automatically
  243. # send email with unlock token
  244. # Default: `false`
  245. #
  246. # user.unlock_token_mailer_disabled = true
  247. # Unlock token mailer class
  248. # Default: `nil`
  249. #
  250. # user.unlock_token_mailer = UserMailer
  251. # -- activity logging --
  252. # Last login attribute name.
  253. # Default: `:last_login_at`
  254. #
  255. # user.last_login_at_attribute_name =
  256. # Last logout attribute name.
  257. # Default: `:last_logout_at`
  258. #
  259. # user.last_logout_at_attribute_name =
  260. # Last activity attribute name.
  261. # Default: `:last_activity_at`
  262. #
  263. # user.last_activity_at_attribute_name =
  264. # How long since last activity is he user defined logged out?
  265. # Default: `10 * 60`
  266. #
  267. # user.activity_timeout =
  268. # -- external --
  269. # Class which holds the various external provider data for this user.
  270. # Default: `nil`
  271. #
  272. # user.authentications_class =
  273. # User's identifier in authentications class.
  274. # Default: `:user_id`
  275. #
  276. # user.authentications_user_id_attribute_name =
  277. # Provider's identifier in authentications class.
  278. # Default: `:provider`
  279. #
  280. # user.provider_attribute_name =
  281. # User's external unique identifier in authentications class.
  282. # Default: `:uid`
  283. #
  284. # user.provider_uid_attribute_name =
  285. # -- remember_me --
  286. # allow the remember_me cookie to settable through AJAX
  287. # Default: `true`
  288. #
  289. # user.remember_me_httponly =
  290. # How long in seconds the session length will be
  291. # Default: `604800`
  292. #
  293. user.remember_me_for = 60 * 60 * 24 * 7 # 1 week
  294. end
  295. # This line must come after the 'user config' block.
  296. # Define which model authenticates with sorcery.
  297. config.user_class = "User"
  298. end