synapses-cas 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,8 @@
1
+ === 0.1.9 :: 2013-01-03
2
+
3
+ * Fix placeholder for login form on Internet Explorer
4
+ * Viewport added for a responsible layout
5
+
1
6
  === 0.1.5 :: 2012-12-20
2
7
 
3
8
  * Gemspec updated to allow version 3.2.1 of "activeresource
data/bin/cas_config.yml CHANGED
@@ -161,7 +161,7 @@ port: 443
161
161
 
162
162
  database:
163
163
  adapter: postgresql
164
- database: synapses_ws_production
164
+ database: synapses_ws_staging
165
165
  username: postgres
166
166
  password: postgres
167
167
  host: localhost
@@ -231,7 +231,7 @@ authenticator:
231
231
  class: CASServer::Authenticators::SQLEncrypted
232
232
  database:
233
233
  adapter: postgresql
234
- database: synapses_ws_production
234
+ database: synapses_ws_staging
235
235
  username: postgres
236
236
  password: postgres
237
237
  host: localhost
@@ -239,7 +239,7 @@ authenticator:
239
239
  username_column: email
240
240
  # password_column: password_hash
241
241
  encrypt_function: 'user.password_hash == Digest::SHA256.hexdigest("#{@password}#{user.password_salt}") && (user.status == "A")'
242
- extra_attributes: name, default_locale, must_change_password, linkedin_profile, id, picture_file_name
242
+ extra_attributes: name, default_locale, must_change_password, linkedin_profile, id, picture_file_name, last_name
243
243
  #
244
244
  # When replying to a CAS client's validation request, the server will normally
245
245
  # provide the client with the authenticated user's username. However it is
@@ -0,0 +1,602 @@
1
+ # IMPORTANT NOTE ABOUT YAML CONFIGURATION FILES
2
+ # ---> Be sure to use spaces instead of tabs for indentation. YAML is
3
+ # white-space sensitive!
4
+
5
+ ##### SERVER SETUP ################################################################
6
+
7
+ # There are several ways to run RubyCAS-Server:
8
+ #
9
+ # webrick -- stand-alone WEBrick server; should work out-of-the-box; this is
10
+ # the default method, but probably not suited for high-traffic usage
11
+ # mongrel -- stand-alone Mongrel server; fast, but you'll need to install
12
+ # and compile Mongrel and run it behind an https reverse proxy like
13
+ # Pound or Apache 2.2's mod_proxy (since Mongrel cannot serve out
14
+ # over SSL on its own).
15
+ # passenger -- served out by Apache via the mod_rails/mod_rack module
16
+ # (see http://www.modrails.com/)
17
+ #
18
+ # The following are example configurations for each of these three methods:
19
+ #
20
+
21
+
22
+ ###
23
+ ### WEBrick example
24
+ ###
25
+ # WEBrick is a simple, all-Ruby web server. This is the easiest method for running
26
+ # RubyCAS-Server. All you need is an SSL certificate (enter its path under the
27
+ # ssl_cert option). WEBrick is fine for sites with low to medium traffic, but for
28
+ # high-performance scenarios you may want to look into deploying using Mongrel
29
+ # or Passenger.
30
+
31
+ server: webrick
32
+ port: 443
33
+ # ssl_cert: /path/to/your/ssl.pem
34
+
35
+ # If your private key is in a separate file from the cert
36
+
37
+ #ssl_key: /path/to/your/private_key.pem
38
+
39
+ # If you do not already have an SSL certificate and would like to automatically
40
+ # generate one, run the "generate_ssl_certificate" rake task and use the following
41
+ # settings:
42
+
43
+ # ssl_cert: ssl/cert.pem
44
+ # ssl_key: ssl/key.pem
45
+
46
+
47
+ # By default the login page will be available at the root path
48
+ # (e.g. https://login.example.net/). The uri_path option lets you serve it from a
49
+ # different path (e.g. https://login.example.net/cas).
50
+
51
+ #ri_path: /cas
52
+
53
+
54
+ # This lets you bind the server to a specific address. Use 0.0.0.0 to listen on
55
+ # all available interfaces (this is the default).
56
+
57
+ #bind_address: 0.0.0.0
58
+
59
+
60
+ ###
61
+ ### Mongrel example
62
+ ###
63
+ # Mongrel is much faster than WEBrick, but there are two caveats:
64
+ # 1. Since Mongrel can't serve out encrypted HTTP on its own (and CAS requires this),
65
+ # you will have to set up a reverse proxy like Pound or Apache's mod_proxy and
66
+ # route through it requests to the Mongrel server. So for example,
67
+ # your Pound server will receive all of the requests to RubyCAS-Server on port 443,
68
+ # and forward them to the Mongrel server listening on port 11011.
69
+ # 2. Some of Mongrel's components are compiled into native binaries, so if you are
70
+ # installing on Linux, make sure you have all of the standard build tools
71
+ # available. The binaries should be automatically compiled for you when you
72
+ # install the mogrel gem (if you're runnings Windows, pre-compiled
73
+ # binaries will be downloaded and installed, so don't worry about this).
74
+
75
+ #server: mongrel
76
+ #port: 11011
77
+
78
+
79
+ # Bind the server to a specific address. Use 0.0.0.0 to listen on all
80
+ # available interfaces (this is the default).
81
+
82
+ #bind_address: 0.0.0.0
83
+
84
+ ### Reverse proxy configuration examples
85
+ # If you're using mod_proxy, your Apache vhost config should look something like this:
86
+ #
87
+ # Listen 443
88
+ # <VirtualHost *:443>
89
+ # ServerAdmin admin@example.net
90
+ # ServerName login.example.net
91
+ #
92
+ # SSLEngine On
93
+ # SSLCertificateFile /etc/apache2/ssl.crt/example.pem
94
+ #
95
+ # # Don't do forward proxying, we only want reverse proxying
96
+ # ProxyRequests Off
97
+ #
98
+ # <Proxy balancer://rubycas>
99
+ # Order allow,deny
100
+ # Allow from all
101
+ # BalancerMember http://127.0.0.1:11011
102
+ # </Proxy>
103
+ # </VirtualHost>
104
+ #
105
+ # For Pound, the config should be something like:
106
+ #
107
+ # ListenHTTPS
108
+ # Address 0.0.0.0
109
+ # Port 11011
110
+ # Cert "/etc/ssl/example.pem"
111
+ #
112
+ # Service
113
+ # BackEnd
114
+ # Address localhost
115
+ # Port 443
116
+ # End
117
+ # End
118
+ # End
119
+
120
+
121
+ ###
122
+ ### Phusion Passenger (running under Apache configured for SSL)
123
+ ###
124
+
125
+ # No additional configuration is requried to run RubyCAS-Server under
126
+ # passsenger. Just follow the normal instructions for a Passenger app
127
+ # (see http://www.modrails.com/).
128
+ #
129
+ # Here's an example Apache vhost config for RubyCAS-Server and Passenger:
130
+ #
131
+ # Listen 443
132
+ # <VirtualHost *:443>
133
+ # ServerAdmin admin@synapses-tools.com.br
134
+ # ServerName mclaren
135
+ #
136
+ # SSLEngine Off
137
+ # SSLCertificateFile /etc/apache2/ssl.crt/example.pem
138
+ #
139
+ # RailsAutoDetect off
140
+ #
141
+ # DocumentRoot /home/jlucasps/.rvm/gems/ruby-1.9.3-p125/gems/rubycas-server-0.7.1.1/public
142
+ #
143
+ # <Directory "/home/jlucasps/.rvm/gems/ruby-1.9.3-p125/gems/rubycas-server-0.7.1.1">
144
+ # AllowOverride all
145
+ # Allow from all
146
+ # </Directory>
147
+ # </VirtualHost>
148
+
149
+
150
+
151
+ ##### DATABASE #################################################################
152
+
153
+ # Set up the database connection. Make sure that this database is secure!
154
+ #
155
+ # By default, we use MySQL, since it is widely used and does not require any
156
+ # additional ruby libraries besides ActiveRecord.
157
+ #
158
+ # With MySQL, your config would be something like the following:
159
+ # (be sure to create the casserver database in MySQL beforehand,
160
+ # i.e. `mysqladmin -u root create casserver`)
161
+
162
+ database:
163
+ adapter: postgresql
164
+ database: synapses_ws_production_20121217
165
+ username: postgres
166
+ password: postgres
167
+ host: localhost
168
+ reconnect: true
169
+
170
+ # IMPORTANT! By default, the server can handle up to ~5 concurrent requests
171
+ # (without queuing). You can increase this by setting the database connection
172
+ # pool size to a higher number. For example, to handle up to ~10 concurrent
173
+ # requests:
174
+ #
175
+ #database:
176
+ # pool: 10
177
+ # adapter: mysql
178
+ # database: casserver
179
+ # username: root
180
+ # password:
181
+ # host: localhost
182
+
183
+ #
184
+ # Instead of MySQL you can use SQLite3, PostgreSQL, MSSQL, or anything else
185
+ # supported by ActiveRecord.
186
+ #
187
+ # With SQLite3 (which does not require a separate database server), your
188
+ # configuration would look something like the following (don't forget to install
189
+ # the sqlite3-ruby gem beforehand!):
190
+
191
+ #database:
192
+ # adapter: sqlite3
193
+ # database: /var/lib/casserver.db
194
+
195
+
196
+ # By default RubyCAS-Server will run migrations at every startup to ensure
197
+ # that its database schema is up-to-date. To disable this behaviour set
198
+ # the following option to true:
199
+
200
+ #disable_auto_migrations: true
201
+
202
+ ##### AUTHENTICATION ###########################################################
203
+
204
+ # Configure how username/passwords are validated.
205
+ #
206
+ # !!! YOU MUST CONFIGURE AT LEAST ONE OF THESE AUTHENTICATION METHODS !!!
207
+ #
208
+ # There are several built-in methods for authentication:
209
+ # SQL, ActiveDirectory, LDAP, and GoogleAccounts. If none of these work for you,
210
+ # it is relatively easy to write your own custom Authenticator class (see below).
211
+ #
212
+ # === SQL Authentication =======================================================
213
+ #
214
+ # The simplest method is to validate against a SQL database. This assumes
215
+ # that all of your users are stored in a table that has a 'username' column
216
+ # and a 'password' column. When the user logs in, CAS connects to this database
217
+ # and looks for a matching username/password in the users table. If a matching
218
+ # username and password is found, authentication is successful.
219
+ #
220
+ # If you prefer to have your passwords stored in an encrypted form, have a
221
+ # look at the SQLEncrypted authenticator:
222
+ # http://code.google.com/p/rubycas-server/wiki/UsingTheSQLEncryptedAuthenticator
223
+ #
224
+ # If your users table stores passwords with MD5 hashing (for example as with
225
+ # validate# Drupal) try using the SQLMd5 version of the SQL authenticator.
226
+ #
227
+ # Example:
228
+ #
229
+ authenticator:
230
+ # class: CASServer::Authenticators::SQL
231
+ class: CASServer::Authenticators::SQLEncrypted
232
+ database:
233
+ adapter: postgresql
234
+ database: synapses_ws_production_20121217
235
+ username: postgres
236
+ password: postgres
237
+ host: localhost
238
+ user_table: users
239
+ username_column: email
240
+ # password_column: password_hash
241
+ encrypt_function: 'user.password_hash == Digest::SHA256.hexdigest("#{@password}#{user.password_salt}") && (user.status == "A")'
242
+ extra_attributes: name, default_locale, must_change_password, linkedin_profile, id, picture_file_name, last_name
243
+ #
244
+ # When replying to a CAS client's validation request, the server will normally
245
+ # provide the client with the authenticated user's username. However it is
246
+ # possible for the server to provide the client with additional attributes.
247
+ # You can configure the SQL authenticator to provide data from additional
248
+ # columns in the users table by listing the names of the columns under the
249
+ # 'extra_attributes' option. Note though that this functionality is experimental.
250
+ # It should work with RubyCAS-Client, but may or may not work with other CAS
251
+ # clients.
252
+ #
253
+ # For example, with this configuration, the 'full_name' and 'access_level'
254
+ # columns will be provided to your CAS clients along with the username:
255
+ #
256
+ # authenticator:
257
+ # class: CASServer::Authenticators::SQL
258
+ # database:
259
+ # adapter: mysql
260
+ # database: some_database_with_users_table
261
+ # user_table: users
262
+ # username_column: username
263
+ # password_column: password
264
+ # extra_attributes: full_name, access_level
265
+ #
266
+ #
267
+ #
268
+ # === Google Authentication ====================================================
269
+ #
270
+ # The Google authenticator allows users to log in to your CAS server using
271
+ # their Google account credentials (i.e. the same email and password they
272
+ # would use to log in to Google services like Gmail). This authenticator
273
+ # requires no special configuration -- just specify its class name:
274
+ #
275
+ #authenticator:
276
+ # class: CASServer::Authenticators::Google
277
+ #
278
+ # If you are behind an http proxy, you can try specifying proxy settings as follows:
279
+ #
280
+ #authenticator:
281
+ # class: CASServer::Authenticators::Google
282
+ # proxy:
283
+ # host: your-proxy-server
284
+ # port: 8080
285
+ # username: nil
286
+ # password: nil
287
+ #
288
+ # Note that as with all authenticators, it is possible to use the Google
289
+ # authenticator alongside other authenticators. For example, CAS can first
290
+ # attempt to validate the account with Google, and if that fails, fall back
291
+ # to some other local authentication mechanism.
292
+ #
293
+ # For example:
294
+ #
295
+ #authenticator:
296
+ # - class: CASServer::Authenticators::Google
297
+ # - class: CASServer::Authenticators::SQL
298
+ # database:
299
+ # adapter: mysql
300
+ # database: some_database_with_users_table
301
+ # username: root
302
+ # password:
303
+ # host: localhost
304
+ # user_table: user
305
+ # username_column: username
306
+ # password_column: password
307
+ #
308
+ #
309
+ # === ActiveDirectory Authentication ===========================================
310
+ #
311
+ # This method authenticates against Microsoft's Active Directory using LDAP.
312
+ # You must configure the ActiveDirectory server, and base DN. The port number
313
+ # and LDAP filter are optional. You must also enter a CN and password
314
+ # for a special "authenticator" user. This account is used to log in to
315
+ # the ActiveDirectory server and search LDAP. This does not have to be an
316
+ # administrative account -- it only has to be able to search for other
317
+ # users.
318
+ #
319
+ # Note that the auth_user parameter must be the user's CN (Common Name).
320
+ # In Active Directory, the CN is genarally the user's full name, which is usually
321
+ # NOT the same as their username (sAMAccountName).
322
+ #
323
+ # For example:
324
+ #
325
+ #authenticator:
326
+ # class: CASServer::Authenticators::ActiveDirectoryLDAP
327
+ # ldap:
328
+ # host: ad.example.net
329
+ # port: 389
330
+ # base: dc=example,dc=net
331
+ # filter: (objectClass=person)
332
+ # auth_user: authenticator
333
+ # auth_password: itsasecret
334
+ #
335
+ # A more complicated example, where the authenticator will use TLS encryption,
336
+ # will ignore users with disabled accounts, and will pass on the 'cn' and 'mail'
337
+ # attributes to CAS clients:
338
+ #
339
+ #authenticator:
340
+ # class: CASServer::Authenticators::ActiveDirectoryLDAP
341
+ # ldap:
342
+ # host: ad.example.net
343
+ # port: 636
344
+ # base: dc=example,dc=net
345
+ # filter: (objectClass=person) & !(msExchHideFromAddressLists=TRUE)
346
+ # auth_user: authenticator
347
+ # auth_password: itsasecret
348
+ # encryption: simple_tls
349
+ # extra_attributes: cn, mail
350
+ #
351
+ # It is possible to authenticate against Active Directory without the
352
+ # authenticator user, but this requires that users type in their CN as
353
+ # the username rather than typing in their sAMAccountName. In other words
354
+ # users will likely have to authenticate by typing their full name,
355
+ # rather than their username. If you prefer to do this, then just
356
+ # omit the auth_user and auth_password values in the above example.
357
+ #
358
+ #
359
+ # === LDAP Authentication ======================================================
360
+ #
361
+ # This is a more general version of the ActiveDirectory authenticator.
362
+ # The configuration is similar, except you don't need an authenticator
363
+ # username or password. The following example has been reported to work
364
+ # for a basic OpenLDAP setup.
365
+ #
366
+ #authenticator:
367
+ # class: CASServer::Authenticators::LDAP
368
+ # ldap:
369
+ # host: ldap.example.net
370
+ # port: 389
371
+ # base: dc=example,dc=net
372
+ # username_attribute: uid
373
+ # filter: (objectClass=person)
374
+ #
375
+ # If you need more secure connections via TSL, specify the 'encryption'
376
+ # option and change the port. This example also forces the authenticator
377
+ # to connect using a special "authenticator" user with the given
378
+ # username and password (see the ActiveDirectoryLDAP authenticator
379
+ # explanation above):
380
+ #
381
+ #authenticator:
382
+ # class: CASServer::Authenticators::LDAP
383
+ # ldap:
384
+ # host: ldap.example.net
385
+ # port: 636
386
+ # base: dc=example,dc=net
387
+ # filter: (objectClass=person)
388
+ # encryption: simple_tls
389
+ # auth_user: cn=admin,dc=example,dc=net
390
+ # auth_password: secret
391
+ #
392
+ # If you need additional data about the user passed to the client (for example,
393
+ # their 'cn' and 'mail' attributes, you can specify the list of attributes
394
+ # under the extra_attributes config option:
395
+ #
396
+ #authenticator:
397
+ # class: CASServer::Authenticators::LDAP
398
+ # ldap:
399
+ # host: ldap.example.net
400
+ # port: 389
401
+ # base: dc=example,dc=net
402
+ # filter: (objectClass=person)
403
+ # extra_attributes: cn, mail
404
+ #
405
+ # Note that the above functionality is somewhat limited by client compatibility.
406
+ # See the SQL authenticator notes above for more info.
407
+ #
408
+ #
409
+ # === Custom Authentication ====================================================
410
+ #
411
+ # It should be relatively easy to write your own Authenticator class. Have a look
412
+ # at the built-in authenticators in the casserver/authenticators directory. Your
413
+ # authenticator should extend the CASServer::Authenticators::Base class and must
414
+ # implement a validate() method that takes a single hash argument. When the user
415
+ # submits the login form, the username and password they entered is passed to
416
+ # validate() as a hash under :username and :password keys. In the future, this
417
+ # hash might also contain other data such as the domain that the user is logging
418
+ # in to.
419
+ #
420
+ # To use your custom authenticator, specify it's class name and path to the
421
+ # source file in the authenticator section of the config. Any other parameters
422
+ # you specify in the authenticator configuration will be passed on to the
423
+ # authenticator and made availabe in the validate() method as an @options hash.
424
+ #
425
+ # Example:
426
+ #
427
+ # authenticator:
428
+ # class: Authenticator
429
+ # source: /media/truecrypt1/worspace_aptana_synapses_ws/synapses_ws/lib/auth/authenticator.rb
430
+ # option_a: foo
431
+ # another_option: yeeha
432
+ #
433
+ # === Multiple Authenticators ==================================================
434
+ #
435
+ # If you need to have more than one source for authentication, such as an LDAP
436
+ # directory and a database, you can use multiple authenticators by making
437
+ # :authenticator an array of authenticators.
438
+ #
439
+ #authenticator:
440
+ # -
441
+ # class: CASServer::Authenticators::ActiveDirectoryLDAP
442
+ # ldap:
443
+ # host: ad.example.net
444
+ # port: 389
445
+ # base: dc=example,dc=net
446
+ # filter: (objectClass=person)
447
+ # -
448
+ # class: CASServer::Authenticators::SQL
449
+ # database:
450
+ # adapter: mysql
451
+ # database: some_database_with_users_table
452
+ # username: root
453
+ # password:
454
+ # host: localhost
455
+ # user_table: user
456
+ # username_column: username
457
+ # password_column: password
458
+ #
459
+ # During authentication, the user credentials will be checked against the first
460
+ # authenticator and on failure fall through to the second authenticator.
461
+ #
462
+
463
+
464
+ ##### LOOK & FEEL ##############################################################
465
+
466
+ # Set the path to the theme directory that determines how your CAS pages look.
467
+ #
468
+ # Custom themes are not well supported yet, but will be in the near future. In
469
+ # the meantime, if you want to create a custom theme, you can create a
470
+ # subdirectory under the CASServer's themes dir (for example,
471
+ # '/usr/lib/ruby/1.8/gems/casserver-xxx/public/themes', if you installed CASServer
472
+ # on Linux as a gem). A theme is basically just a theme.css file that overrides
473
+ # the themes/cas.css styles along with a collection of image files
474
+ # like logo.png and bg.png.
475
+ #
476
+ # By default, we use the 'simple' theme which you can find in themes/simple.
477
+ theme: bootstrap
478
+
479
+ # The name of your company/organization. This will show up on the login page.
480
+ organization: Synapses
481
+
482
+ # A short bit of text that shows up on the login page. You can make this blank
483
+ # if you prefer to have no extra text shown at the bottom of the login box.
484
+ infoline: Powered by <a href="http://www.synapses.com.br/">Synapses</a>
485
+
486
+ password_recovery_url: http://localhost:3000/users/password_recovery
487
+
488
+ # Custom views directory. If set, this will be used instead of 'lib/casserver/views'.
489
+ #custom_views: /path/to/custom/views
490
+
491
+ # Custom public directory. If set, static content (css, etc.) will be served from here rather
492
+ # than from rubycas-server's internal 'public' directory (but be mindful of any overriding
493
+ # settings you may have in your web server's config).
494
+ #public_dir: /path/to/custom/public
495
+
496
+ ##### LOCALIZATION (L10N) #######################################################
497
+ # The server will attempt to detect the user's locale and show text in the
498
+ # appropriate language based on:
499
+ #
500
+ # 1. The 'lang' URL parameter (if any)
501
+ # 2. The 'lang' cookie (if any)
502
+ # 3. The HTTP_ACCEPT_LANGUAGE header supplied by the user's browser.
503
+ # 4. The HTTP_USER_AGENT header supplied by the user's browser.
504
+ #
505
+ # If the locale cannot be established based on one of the above checks (in the
506
+ # shown order), then the below 'default_locale' option will be used.
507
+ #
508
+ # The format is the same as standard linux locales (langagecode_COUNTRYCODE):
509
+ #
510
+ # ru_RU - Russian, Russia
511
+ # eo_AQ - Esperanto, Antarctica
512
+ #
513
+ # It will also work if you leave out the region (i.e. just "ru" for Russian,
514
+ # "eo" for Esperanto).
515
+ #
516
+ # If you are interested in contributing new translations or have corrections
517
+ # to the existing translations, see
518
+ # http://code.google.com/p/rubycas-server/wiki/HowToContribueTranslations
519
+ #
520
+ default_locale: pt
521
+
522
+ ##### LOGGING ##################################################################
523
+
524
+ # Configure general logging. This log is where you'll want to look in case of
525
+ # problems.
526
+ #
527
+ # You may want to change the file to something like /var/log/casserver.log
528
+ # Set the level to DEBUG if you want more detailed logging.
529
+
530
+ log:
531
+ file: /var/log/synapses_cas_server.log
532
+ level: DEBUG
533
+
534
+
535
+ # If you want full database logging, uncomment this next section.
536
+ # Every SQL query will be logged here. This is useful for debugging database
537
+ # problems.
538
+
539
+ db_log:
540
+ file: /var/log/synapses_cas_db.log
541
+
542
+
543
+ # Setting the following option to true will disable CLI output to stdout.
544
+ # i.e. this will get rid of messages like ">>> Redirecting RubyCAS-Server log..."
545
+ # This is useful when, for example, you're running rspecs.
546
+
547
+ #quiet: true
548
+
549
+
550
+ ##### SINGLE SIGN-OUT ##########################################################
551
+
552
+ # When a user logs in to a CAS-enabled client application, that application
553
+ # generally opens its own local user session. When the user then logs out
554
+ # through the CAS server, each of the CAS-enabled client applications need
555
+ # to be notified so that they can close their own local sessions for that user.
556
+ #
557
+ # Up until recently this was not possible within CAS. However, a method for
558
+ # performing this notification was recently added to the protocol (in CAS 3.1).
559
+ # This works exactly as described above -- when the user logs out, the CAS
560
+ # server individually contacts each client service and notifies it of the
561
+ # logout. Currently not all client applications support this, so this
562
+ # behaviour is disabled by default. To enable it, uncomment the following
563
+ # configuration line. Note that currently it is not possible to enable
564
+ # or disable single-sign-out on a per-service basis, but this functionality
565
+ # is planned for a future release.
566
+
567
+ enable_single_sign_out: true
568
+ ##### SERVICES #################################################################
569
+ # You can restrict what services can authenticate against the CAS server.
570
+ # By default any service can authenticate and a blank white list will also
571
+ # allow any service to authenticate. Services are listed on a single line
572
+ # separated by a comma.
573
+ service_whitelist: http://localhost:3000,http://localhost:3001,http://localhost:3002,http://192.168.1.194:3000,http://192.168.1.194:3001,http://192.168.1.194:3002
574
+ #default_service: http://localhost:3000
575
+ ##### OTHER ####################################################################
576
+
577
+ # You can set various ticket expiry times (specify the value in seconds).
578
+
579
+ # Unused login and service tickets become unusable this many seconds after
580
+ # they are created. (Defaults to 5 minutes)
581
+
582
+ #maximum_unused_login_ticket_lifetime: 300
583
+ #maximum_unused_service_ticket_lifetime: 300
584
+
585
+ # The server must periodically delete old tickets (login tickets, service tickets
586
+ # proxy-granting tickets, and ticket-granting tickets) to prevent buildup of
587
+ # stale data. This effectively limits the maximum length of a CAS session to
588
+ # the lifetime given here (in seconds). (Defaults to 48 hours)
589
+ #
590
+ # Note that this limit is not enforced on the client side; it refers only to the
591
+ # the maximum lifetime of tickets on the CAS server.
592
+
593
+ #maximum_session_lifetime: 172800
594
+
595
+
596
+ # If you want the usernames entered on the login page to be automatically
597
+ # downcased (converted to lowercase), enable the following option. When this
598
+ # option is set to true, if the user enters "JSmith" as their username, the
599
+ # system will automatically
600
+ # convert this to "jsmith".
601
+
602
+ #downcase_username: true
@@ -533,8 +533,6 @@ module CASServer
533
533
 
534
534
  # 2.3.1
535
535
  get "#{uri_path}/logout" do
536
- puts '>>>>>>>>>>>>>>>>>>>>>>>>'
537
- puts 'Logout'
538
536
  CASServer::Utils::log_controller_action(self.class, params)
539
537
 
540
538
  # The behaviour here is somewhat non-standard. Rather than showing just a blank
@@ -5,15 +5,32 @@
5
5
  xml:lang="en" lang="en" >
6
6
 
7
7
  <head>
8
+ <meta charset="utf-8">
9
+ <meta http-equiv="content-type" content="text/html;charset=UTF-8"/>
10
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
11
+ <meta name="description" content="Synapses <%= t.label.central_login_title %>">
12
+ <meta name="author" content="Synapses">
13
+
8
14
  <title><%= escape_html @organization %> <%= t.label.central_login_title %></title>
9
15
  <link rel="stylesheet" type="text/css" href="<%= escape_html @uri_path %>/themes/<%= escape_html @theme %>/css/theme.css" />
10
16
  <link rel="stylesheet" type="text/css" href="<%= escape_html @uri_path %>/themes/<%= escape_html @theme %>/css/extra.css" />
11
17
  <link rel="icon" type="image/png" href="<%= escape_html @uri_path %>/themes/<%= escape_html @theme %>/favicon.png" />
12
18
  <script src="<%= escape_html @uri_path %>/js/jquery-1.7.1.min.js"></script>
13
19
  <script src="<%= escape_html @uri_path %>/js/bootstrap.min.js"></script>
20
+ <script src="<%= escape_html @uri_path %>/js/jquery.placeholder.min.js"></script>
14
21
  </head>
15
22
 
16
- <body>
23
+ <body>
17
24
  <%= yield %>
25
+
26
+
27
+ <script type="text/javascript">
28
+ $(function(){
29
+ $('input, textarea').placeholder();
30
+ });
31
+ </script>
18
32
  </body>
33
+
34
+
35
+
19
36
  </html>
@@ -3,8 +3,8 @@
3
3
  <div class="content">
4
4
  <div class="row">
5
5
  <div class="login-form">
6
- <div style="padding-bottom:15px;">
7
- <img id="logo" src="<%= escape_html @uri_path %>/themes/<%= @theme %>/img/logo.png"/>
6
+ <div style="padding-bottom:15px; margin-left:-20px">
7
+ <img id="logo" src="<%= escape_html @uri_path %>/themes/<%= @theme %>/img/logo.jpg"/>
8
8
  </div>
9
9
  <% if @message %>
10
10
  <div class="alert alert-<%= escape_html @message[:type] %>">
@@ -19,7 +19,7 @@
19
19
  <input type="text" id="username" name="username" tabindex="1" accesskey="u" placeholder="<%= t.label.username %>"/>
20
20
  </div>
21
21
  <div class="clearfix">
22
- <input type="password" id="password" name="password" size="32" tabindex="2" accesskey="p" autocomplete="off" placeholder="<%= t.label.password %>" />
22
+ <input type="password" id="password" name="password" size="32" tabindex="2" accesskey="p" autocomplete="off" placeholder="<%= t.label.password %>"/>
23
23
  </div>
24
24
  <input type="hidden" id="lt" name="lt" value="<%= escape_html @lt %>" />
25
25
  <input type="hidden" id="service" name="service" value="<%= escape_html @service %>" />
@@ -0,0 +1,2 @@
1
+ /*! http://mths.be/placeholder v2.0.7 by @mathias */
2
+ ;(function(f,h,$){var a='placeholder' in h.createElement('input'),d='placeholder' in h.createElement('textarea'),i=$.fn,c=$.valHooks,k,j;if(a&&d){j=i.placeholder=function(){return this};j.input=j.textarea=true}else{j=i.placeholder=function(){var l=this;l.filter((a?'textarea':':input')+'[placeholder]').not('.placeholder').bind({'focus.placeholder':b,'blur.placeholder':e}).data('placeholder-enabled',true).trigger('blur.placeholder');return l};j.input=a;j.textarea=d;k={get:function(m){var l=$(m);return l.data('placeholder-enabled')&&l.hasClass('placeholder')?'':m.value},set:function(m,n){var l=$(m);if(!l.data('placeholder-enabled')){return m.value=n}if(n==''){m.value=n;if(m!=h.activeElement){e.call(m)}}else{if(l.hasClass('placeholder')){b.call(m,true,n)||(m.value=n)}else{m.value=n}}return l}};a||(c.input=k);d||(c.textarea=k);$(function(){$(h).delegate('form','submit.placeholder',function(){var l=$('.placeholder',this).each(b);setTimeout(function(){l.each(e)},10)})});$(f).bind('beforeunload.placeholder',function(){$('.placeholder').each(function(){this.value=''})})}function g(m){var l={},n=/^jQuery\d+$/;$.each(m.attributes,function(p,o){if(o.specified&&!n.test(o.name)){l[o.name]=o.value}});return l}function b(m,n){var l=this,o=$(l);if(l.value==o.attr('placeholder')&&o.hasClass('placeholder')){if(o.data('placeholder-password')){o=o.hide().next().show().attr('id',o.removeAttr('id').data('placeholder-id'));if(m===true){return o[0].value=n}o.focus()}else{l.value='';o.removeClass('placeholder');l==h.activeElement&&l.select()}}}function e(){var q,l=this,p=$(l),m=p,o=this.id;if(l.value==''){if(l.type=='password'){if(!p.data('placeholder-textinput')){try{q=p.clone().attr({type:'text'})}catch(n){q=$('<input>').attr($.extend(g(this),{type:'text'}))}q.removeAttr('name').data({'placeholder-password':true,'placeholder-id':o}).bind('focus.placeholder',b);p.data({'placeholder-textinput':q,'placeholder-id':o}).before(q)}p=p.removeAttr('id').hide().prev().attr('id',o).show()}p.addClass('placeholder');p[0].value=p.attr('placeholder')}else{p.removeClass('placeholder')}}}(this,document,jQuery));
@@ -31,4 +31,7 @@ legend {
31
31
  margin-right: -50px;
32
32
  font-weight: bold;
33
33
  color: #404040;
34
- }
34
+ }
35
+
36
+ input, textarea { color: #000; }
37
+ .placeholder { color: #aaa; }
data/synapses-cas.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  $gemspec = Gem::Specification.new do |s|
2
2
  s.name = 'synapses-cas'
3
- s.version = '0.1.8'
3
+ s.version = '0.1.9'
4
4
  s.authors = ["Synapses Group"]
5
5
  s.email = ["tiago@synapses.com.br"]
6
6
  s.homepage = 'https://github.com/synapsesgroup/synapses-cas'
@@ -30,7 +30,7 @@ $gemspec = Gem::Specification.new do |s|
30
30
  s.add_dependency("activesupport", ">= 2.3.12", "< 3.1")
31
31
  s.add_dependency("activeresource", ">= 2.3.12", "< 3.1")
32
32
  s.add_dependency("sinatra", "~> 1.0")
33
- s.add_dependency("sinatra-r18n")
33
+ s.add_dependency("sinatra-r18n", "~> 1.1.0")
34
34
  s.add_dependency("crypt-isaac", "~> 0.9.1")
35
35
  s.add_dependency("pg")
36
36
  s.add_dependency("bcrypt-ruby")
@@ -44,10 +44,6 @@ $gemspec = Gem::Specification.new do |s|
44
44
  s.add_dependency("rake", "0.8.7")
45
45
 
46
46
 
47
-
48
-
49
-
50
-
51
47
  s.rdoc_options = [
52
48
  '--quiet', '--title', 'RubyCAS-Server Documentation', '--opname',
53
49
  'index.html', '--line-numbers', '--main', 'README.md', '--inline-source'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: synapses-cas
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-22 00:00:00.000000000 Z
12
+ date: 2013-01-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
@@ -98,17 +98,17 @@ dependencies:
98
98
  requirement: !ruby/object:Gem::Requirement
99
99
  none: false
100
100
  requirements:
101
- - - ! '>='
101
+ - - ~>
102
102
  - !ruby/object:Gem::Version
103
- version: '0'
103
+ version: 1.1.0
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  none: false
108
108
  requirements:
109
- - - ! '>='
109
+ - - ~>
110
110
  - !ruby/object:Gem::Version
111
- version: '0'
111
+ version: 1.1.0
112
112
  - !ruby/object:Gem::Dependency
113
113
  name: crypt-isaac
114
114
  requirement: !ruby/object:Gem::Requirement
@@ -287,6 +287,7 @@ files:
287
287
  - Rakefile
288
288
  - setup.rb
289
289
  - bin/cas_config.yml
290
+ - bin/cas_config_production.yml
290
291
  - bin/synapses-cas
291
292
  - db/migrate/001_create_initial_structure.rb
292
293
  - lib/casserver/authenticators/active_directory_ldap.rb
@@ -320,11 +321,13 @@ files:
320
321
  - public/js/bootstrap.js
321
322
  - public/js/bootstrap.min.js
322
323
  - public/js/jquery-1.7.1.min.js
324
+ - public/js/jquery.placeholder.min.js
323
325
  - public/themes/bootstrap/css/extra.css
324
326
  - public/themes/bootstrap/css/theme.css
325
327
  - public/themes/bootstrap/img/bg.png
326
328
  - public/themes/bootstrap/img/glyphicons-halflings-white.png
327
329
  - public/themes/bootstrap/img/glyphicons-halflings.png
330
+ - public/themes/bootstrap/img/logo.jpg
328
331
  - public/themes/bootstrap/img/logo.png
329
332
  - public/themes/cas.css
330
333
  - public/themes/notice.png