uchouhan-rubycas-server 1.0.a

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. data/CHANGELOG +289 -0
  2. data/LICENSE +26 -0
  3. data/README.md +19 -0
  4. data/Rakefile +1 -0
  5. data/bin/rubycas-server +16 -0
  6. data/bin/rubycas-server-ctl +9 -0
  7. data/lib/casserver.rb +13 -0
  8. data/lib/casserver/authenticators/active_directory_ldap.rb +19 -0
  9. data/lib/casserver/authenticators/authlogic_crypto_providers/aes256.rb +43 -0
  10. data/lib/casserver/authenticators/authlogic_crypto_providers/bcrypt.rb +92 -0
  11. data/lib/casserver/authenticators/authlogic_crypto_providers/md5.rb +34 -0
  12. data/lib/casserver/authenticators/authlogic_crypto_providers/sha1.rb +59 -0
  13. data/lib/casserver/authenticators/authlogic_crypto_providers/sha512.rb +50 -0
  14. data/lib/casserver/authenticators/base.rb +67 -0
  15. data/lib/casserver/authenticators/client_certificate.rb +47 -0
  16. data/lib/casserver/authenticators/google.rb +58 -0
  17. data/lib/casserver/authenticators/ldap.rb +147 -0
  18. data/lib/casserver/authenticators/ntlm.rb +88 -0
  19. data/lib/casserver/authenticators/open_id.rb +22 -0
  20. data/lib/casserver/authenticators/sql.rb +133 -0
  21. data/lib/casserver/authenticators/sql_authlogic.rb +93 -0
  22. data/lib/casserver/authenticators/sql_encrypted.rb +77 -0
  23. data/lib/casserver/authenticators/sql_md5.rb +19 -0
  24. data/lib/casserver/authenticators/sql_rest_auth.rb +85 -0
  25. data/lib/casserver/authenticators/tacc.rb +67 -0
  26. data/lib/casserver/authenticators/test.rb +21 -0
  27. data/lib/casserver/cas.rb +327 -0
  28. data/lib/casserver/localization.rb +91 -0
  29. data/lib/casserver/model.rb +269 -0
  30. data/lib/casserver/server.rb +623 -0
  31. data/lib/casserver/utils.rb +32 -0
  32. data/lib/casserver/views/_login_form.erb +41 -0
  33. data/lib/casserver/views/layout.erb +17 -0
  34. data/lib/casserver/views/login.erb +29 -0
  35. data/lib/casserver/views/proxy.builder +11 -0
  36. data/lib/casserver/views/proxy_validate.builder +26 -0
  37. data/lib/casserver/views/service_validate.builder +19 -0
  38. data/lib/casserver/views/validate.erb +1 -0
  39. data/po/de_DE/rubycas-server.po +127 -0
  40. data/po/es_ES/rubycas-server.po +123 -0
  41. data/po/fr_FR/rubycas-server.po +128 -0
  42. data/po/ja_JP/rubycas-server.po +126 -0
  43. data/po/pl_PL/rubycas-server.po +123 -0
  44. data/po/pt_BR/rubycas-server.po +123 -0
  45. data/po/ru_RU/rubycas-server.po +118 -0
  46. data/po/rubycas-server.pot +112 -0
  47. data/po/zh_CN/rubycas-server.po +113 -0
  48. data/po/zh_TW/rubycas-server.po +113 -0
  49. data/public/themes/cas.css +121 -0
  50. data/public/themes/notice.png +0 -0
  51. data/public/themes/ok.png +0 -0
  52. data/public/themes/simple/bg.png +0 -0
  53. data/public/themes/simple/favicon.png +0 -0
  54. data/public/themes/simple/login_box_bg.png +0 -0
  55. data/public/themes/simple/logo.png +0 -0
  56. data/public/themes/simple/theme.css +28 -0
  57. data/public/themes/tadnet/bg.png +0 -0
  58. data/public/themes/tadnet/button.png +0 -0
  59. data/public/themes/tadnet/favicon.png +0 -0
  60. data/public/themes/tadnet/login_box_bg.png +0 -0
  61. data/public/themes/tadnet/logo.png +0 -0
  62. data/public/themes/tadnet/theme.css +55 -0
  63. data/public/themes/urbacon/bg.png +0 -0
  64. data/public/themes/urbacon/login_box_bg.png +0 -0
  65. data/public/themes/urbacon/logo.png +0 -0
  66. data/public/themes/urbacon/theme.css +33 -0
  67. data/public/themes/warning.png +0 -0
  68. data/resources/config.example.yml +574 -0
  69. data/resources/config.ru +42 -0
  70. data/resources/custom_views.example.rb +11 -0
  71. data/resources/init.d.sh +58 -0
  72. data/rubycas-server.gemspec +40 -0
  73. data/setup.rb +1585 -0
  74. data/spec/alt_config.yml +46 -0
  75. data/spec/casserver_spec.rb +114 -0
  76. data/spec/default_config.yml +46 -0
  77. data/spec/spec.opts +4 -0
  78. data/spec/spec_helper.rb +89 -0
  79. data/tasks/bundler.rake +4 -0
  80. data/tasks/db/migrate.rake +12 -0
  81. data/tasks/localization.rake +13 -0
  82. data/tasks/spec.rake +10 -0
  83. metadata +172 -0
@@ -0,0 +1,112 @@
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # Copyright (C) 2009 of The Contributors (see project history on github.com)
3
+ # This file is distributed under the same license as the RubyCAS-Server package.
4
+ # Matt Zukowski, 2009.
5
+ #
6
+ #, fuzzy
7
+ msgid ""
8
+ msgstr ""
9
+ "Project-Id-Version: rubycas-server \n"
10
+ "POT-Creation-Date: 2009-09-29 17:04+0800\n"
11
+ "PO-Revision-Date: 2008-10-29 20:55+0200\n"
12
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
+ "Language-Team: LANGUAGE <LL@li.org>\n"
14
+ "MIME-Version: 1.0\n"
15
+ "Content-Type: text/plain; charset=UTF-8\n"
16
+ "Content-Transfer-Encoding: 8bit\n"
17
+ "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
18
+
19
+ #: lib/casserver/cas.rb:117
20
+ msgid ""
21
+ "Your login request did not include a login ticket. There may be a problem "
22
+ "with the authentication system."
23
+ msgstr ""
24
+
25
+ #: lib/casserver/cas.rb:121
26
+ msgid ""
27
+ "The login ticket you provided has already been used up. Please try logging "
28
+ "in again."
29
+ msgstr ""
30
+
31
+ #: lib/casserver/cas.rb:126
32
+ msgid "You took too long to enter your credentials. Please try again."
33
+ msgstr ""
34
+
35
+ #: lib/casserver/cas.rb:130
36
+ msgid ""
37
+ "The login ticket you provided is invalid. There may be a problem with the "
38
+ "authentication system."
39
+ msgstr ""
40
+
41
+ #: lib/casserver/controllers.rb:32
42
+ msgid ""
43
+ "You are currently logged in as '%s'. If this is not you, please log in below."
44
+ msgstr ""
45
+
46
+ #: lib/casserver/controllers.rb:37
47
+ msgid ""
48
+ "The client and server are unable to negotiate authentication. Please try "
49
+ "logging in again later."
50
+ msgstr ""
51
+
52
+ #: lib/casserver/controllers.rb:54
53
+ msgid ""
54
+ "The server cannot fulfill this gateway request because no service parameter "
55
+ "was given."
56
+ msgstr ""
57
+
58
+ #: lib/casserver/controllers.rb:59 lib/casserver/controllers.rb:179
59
+ msgid ""
60
+ "The target service your browser supplied appears to be invalid. Please "
61
+ "contact your system administrator for help."
62
+ msgstr ""
63
+
64
+ #: lib/casserver/controllers.rb:88
65
+ msgid ""
66
+ "Could not guess the CAS login URI. Please supply a submitToURI parameter "
67
+ "with your request."
68
+ msgstr ""
69
+
70
+ #: lib/casserver/controllers.rb:168
71
+ msgid "You have successfully logged in."
72
+ msgstr ""
73
+
74
+ #: lib/casserver/controllers.rb:184
75
+ msgid "Incorrect username or password."
76
+ msgstr ""
77
+
78
+ #: lib/casserver/controllers.rb:267
79
+ msgid "You have successfully logged out."
80
+ msgstr ""
81
+
82
+ #: lib/casserver/controllers.rb:269
83
+ msgid " Please click on the following link to continue:"
84
+ msgstr ""
85
+
86
+ #: lib/casserver/controllers.rb:419
87
+ msgid "To generate a login ticket, you must make a POST request."
88
+ msgstr ""
89
+
90
+ #: lib/casserver/views.rb:43 lib/casserver/views.rb:120
91
+ msgid " Central Login"
92
+ msgstr ""
93
+
94
+ #: lib/casserver/views.rb:68
95
+ msgid "Please wait..."
96
+ msgstr ""
97
+
98
+ #: lib/casserver/views.rb:74
99
+ msgid "Username"
100
+ msgstr ""
101
+
102
+ #: lib/casserver/views.rb:83
103
+ msgid "Password"
104
+ msgstr ""
105
+
106
+ #: lib/casserver/views.rb:92
107
+ msgid "Remeber me on this computer"
108
+ msgstr ""
109
+
110
+ #: lib/casserver/views.rb:101
111
+ msgid "LOGIN"
112
+ msgstr ""
@@ -0,0 +1,113 @@
1
+ # Simplified Chinese translations for RubyCAS-Server package
2
+ # RubyCAS-Server 的简体中文翻译。
3
+ # Copyright (C) 2008 THE RubyCAS-Server'S COPYRIGHT HOLDER
4
+ # This file is distributed under the same license as the RubyCAS-Server package.
5
+ # hgf <neooen.hu@gmail.com>, 2010.
6
+ #
7
+ msgid ""
8
+ msgstr ""
9
+ "Project-Id-Version: rubycas-server \n"
10
+ "POT-Creation-Date: 2009-09-29 17:04+0800\n"
11
+ "PO-Revision-Date: 2009-03-17 20:55+0200\n"
12
+ "Last-Translator: hgf <neooen.hu@gmail.com>\n"
13
+ "Language-Team: Simplified Chinese\n"
14
+ "MIME-Version: 1.0\n"
15
+ "Content-Type: text/plain; charset=UTF-8\n"
16
+ "Content-Transfer-Encoding: 8bit\n"
17
+ "Plural-Forms: nplurals=2; plural=(n > 1);\n"
18
+
19
+ #: lib/casserver/cas.rb:117
20
+ msgid ""
21
+ "Your login request did not include a login ticket. There may be a problem "
22
+ "with the authentication system."
23
+ msgstr "你的登录请求没包含登录凭证,这可能是认证系统的问题"
24
+
25
+ #: lib/casserver/cas.rb:121
26
+ msgid ""
27
+ "The login ticket you provided has already been used up. Please try logging "
28
+ "in again."
29
+ msgstr "你提供的登录凭证已经使用过了,请重新登录"
30
+
31
+ #: lib/casserver/cas.rb:126
32
+ msgid "You took too long to enter your credentials. Please try again."
33
+ msgstr "你的认证花了太长时间,请重新认证"
34
+
35
+ #: lib/casserver/cas.rb:130
36
+ msgid ""
37
+ "The login ticket you provided is invalid. There may be a problem with the "
38
+ "authentication system."
39
+ msgstr "你所提供的登录凭证是无效的,这可能是认证系统的问题"
40
+
41
+ #: lib/casserver/controllers.rb:32
42
+ msgid ""
43
+ "You are currently logged in as '%s'. If this is not you, please log in below."
44
+ msgstr "你正以 '%s' 的身份登入。如果这不是你,请重新登录"
45
+
46
+ #: lib/casserver/controllers.rb:37
47
+ msgid ""
48
+ "The client and server are unable to negotiate authentication. Please try "
49
+ "logging in again later."
50
+ msgstr "现在无法认证,请稍后重试"
51
+
52
+ #: lib/casserver/controllers.rb:54
53
+ msgid ""
54
+ "The server cannot fulfill this gateway request because no service parameter "
55
+ "was given."
56
+ msgstr "无法完成网关请求,因为没有提供服务的参数"
57
+
58
+ #: lib/casserver/controllers.rb:59 lib/casserver/controllers.rb:179
59
+ msgid ""
60
+ "The target service your browser supplied appears to be invalid. Please "
61
+ "contact your system administrator for help."
62
+ msgstr "你的浏览器提供的网址是无效的,请联系你的系统管理员"
63
+
64
+ #: lib/casserver/controllers.rb:88
65
+ msgid ""
66
+ "Could not guess the CAS login URI. Please supply a submitToURI parameter "
67
+ "with your request."
68
+ msgstr "无法判断 CAS 的登录地址。请提供 submitToURI 的参数"
69
+
70
+ #: lib/casserver/controllers.rb:168
71
+ msgid "You have successfully logged in."
72
+ msgstr "你成功登录了"
73
+
74
+ #: lib/casserver/controllers.rb:184
75
+ msgid "Incorrect username or password."
76
+ msgstr "错误的帐号或密码"
77
+
78
+ #: lib/casserver/controllers.rb:267
79
+ msgid "You have successfully logged out."
80
+ msgstr "你成功登出了"
81
+
82
+ #: lib/casserver/controllers.rb:269
83
+ msgid " Please click on the following link to continue:"
84
+ msgstr " 请点击下列连接继续"
85
+
86
+ #: lib/casserver/controllers.rb:419
87
+ msgid "To generate a login ticket, you must make a POST request."
88
+ msgstr "你必须使用 POST 来产生登录凭证"
89
+
90
+ #: lib/casserver/views.rb:43 lib/casserver/views.rb:120
91
+ msgid " Central Login"
92
+ msgstr " 整合登录"
93
+
94
+ #: lib/casserver/views.rb:68
95
+ msgid "Please wait..."
96
+ msgstr "请稍候..."
97
+
98
+ #: lib/casserver/views.rb:74
99
+ msgid "Username"
100
+ msgstr "用户名"
101
+
102
+ #: lib/casserver/views.rb:83
103
+ msgid "Password"
104
+ msgstr "密码"
105
+
106
+ #: lib/casserver/views.rb:92
107
+ msgid "Remeber me on this computer"
108
+ msgstr "记住我"
109
+
110
+ #: lib/casserver/views.rb:101
111
+ msgid "LOGIN"
112
+ msgstr "登录"
113
+
@@ -0,0 +1,113 @@
1
+ # Traditional Chinese translations for RubyCAS-Server package
2
+ # RubyCAS-Server 的正體中文翻譯。
3
+ # Copyright (C) 2008 THE RubyCAS-Server'S COPYRIGHT HOLDER
4
+ # This file is distributed under the same license as the RubyCAS-Server package.
5
+ # Lin Jen-Shin <godfat@godfat.org>, 2009.
6
+ #
7
+ msgid ""
8
+ msgstr ""
9
+ "Project-Id-Version: rubycas-server \n"
10
+ "POT-Creation-Date: 2009-09-29 17:04+0800\n"
11
+ "PO-Revision-Date: 2009-03-17 20:55+0200\n"
12
+ "Last-Translator: Lin Jen-Shin <godfat@godfat.org>\n"
13
+ "Language-Team: Traditional Chinese\n"
14
+ "MIME-Version: 1.0\n"
15
+ "Content-Type: text/plain; charset=UTF-8\n"
16
+ "Content-Transfer-Encoding: 8bit\n"
17
+ "Plural-Forms: nplurals=2; plural=(n > 1);\n"
18
+
19
+ #: lib/casserver/cas.rb:117
20
+ msgid ""
21
+ "Your login request did not include a login ticket. There may be a problem "
22
+ "with the authentication system."
23
+ msgstr "你沒有傳送登入憑証,這可能是認證系統的問題"
24
+
25
+ #: lib/casserver/cas.rb:121
26
+ msgid ""
27
+ "The login ticket you provided has already been used up. Please try logging "
28
+ "in again."
29
+ msgstr "你所提供的登入憑証已經被使用過了,請重新登入"
30
+
31
+ #: lib/casserver/cas.rb:126
32
+ msgid "You took too long to enter your credentials. Please try again."
33
+ msgstr "你的認證花了太多時間,請再試一次"
34
+
35
+ #: lib/casserver/cas.rb:130
36
+ msgid ""
37
+ "The login ticket you provided is invalid. There may be a problem with the "
38
+ "authentication system."
39
+ msgstr "你所傳送的登入憑証是無效的,這可能是認證系統的問題"
40
+
41
+ #: lib/casserver/controllers.rb:32
42
+ msgid ""
43
+ "You are currently logged in as '%s'. If this is not you, please log in below."
44
+ msgstr "你正以 '%s' 的身分登入。如果這不是你,請重新登入"
45
+
46
+ #: lib/casserver/controllers.rb:37
47
+ msgid ""
48
+ "The client and server are unable to negotiate authentication. Please try "
49
+ "logging in again later."
50
+ msgstr "現在無法認證,請稍候再嘗試登入"
51
+
52
+ #: lib/casserver/controllers.rb:54
53
+ msgid ""
54
+ "The server cannot fulfill this gateway request because no service parameter "
55
+ "was given."
56
+ msgstr "無法完成 gateway request 因為沒有提供 service 的參數"
57
+
58
+ #: lib/casserver/controllers.rb:59 lib/casserver/controllers.rb:179
59
+ msgid ""
60
+ "The target service your browser supplied appears to be invalid. Please "
61
+ "contact your system administrator for help."
62
+ msgstr "你的瀏覽器傳送的服務網址是無效的,請向你的系統管理員尋求協助"
63
+
64
+ #: lib/casserver/controllers.rb:88
65
+ msgid ""
66
+ "Could not guess the CAS login URI. Please supply a submitToURI parameter "
67
+ "with your request."
68
+ msgstr "無法判斷 CAS 的登入網址。請提供 submitToURI 的參數"
69
+
70
+ #: lib/casserver/controllers.rb:168
71
+ msgid "You have successfully logged in."
72
+ msgstr "你成功登入了"
73
+
74
+ #: lib/casserver/controllers.rb:184
75
+ msgid "Incorrect username or password."
76
+ msgstr "你所輸入的帳號或是密碼是錯誤的"
77
+
78
+ #: lib/casserver/controllers.rb:267
79
+ msgid "You have successfully logged out."
80
+ msgstr "你成功登出了"
81
+
82
+ #: lib/casserver/controllers.rb:269
83
+ msgid " Please click on the following link to continue:"
84
+ msgstr " 請點以下的連結繼續"
85
+
86
+ #: lib/casserver/controllers.rb:419
87
+ msgid "To generate a login ticket, you must make a POST request."
88
+ msgstr "你必須使用 POST 來產生登入憑証"
89
+
90
+ #: lib/casserver/views.rb:43 lib/casserver/views.rb:120
91
+ msgid " Central Login"
92
+ msgstr " 整合登入"
93
+
94
+ #: lib/casserver/views.rb:68
95
+ msgid "Please wait..."
96
+ msgstr "請稍候..."
97
+
98
+ #: lib/casserver/views.rb:74
99
+ msgid "Username"
100
+ msgstr "帳號"
101
+
102
+ #: lib/casserver/views.rb:83
103
+ msgid "Password"
104
+ msgstr "密碼"
105
+
106
+ #: lib/casserver/views.rb:92
107
+ msgid "Remeber me on this computer"
108
+ msgstr "在這台電腦上記住我"
109
+
110
+ #: lib/casserver/views.rb:101
111
+ msgid "LOGIN"
112
+ msgstr "登入"
113
+
@@ -0,0 +1,121 @@
1
+ * {
2
+ font-family: Verdana, sans-serif;
3
+ }
4
+
5
+ body {
6
+ text-align: center; /* hack for IE */
7
+ }
8
+
9
+ label {
10
+ font-weight: bold;
11
+ font-size: 9px;
12
+ }
13
+
14
+ input {
15
+ font-weight: normal;
16
+ font-size: 12px;
17
+ }
18
+
19
+ input.button {
20
+ /*font-weight: bold;*/
21
+ font-size: 10px;
22
+ }
23
+
24
+ #login-box {
25
+ margin: 0 auto;
26
+ width: 350px;
27
+ top: 130px;
28
+ position: relative;
29
+ }
30
+
31
+ #headline-container {
32
+ text-align: right;
33
+ border-bottom: 1px solid #899989;
34
+ font-family: Tahoma, Verdana, sans-serif;
35
+ font-size: 22px;
36
+ margin-right: 0px;
37
+ padding-right: 7px;
38
+ margin-left: 10px;
39
+ letter-spacing: -0.25px;
40
+ }
41
+
42
+ #logo-container {
43
+ vertical-align: top;
44
+ }
45
+
46
+ #logo {
47
+ }
48
+
49
+ #login-form-container {
50
+ vertical-align: top;
51
+ }
52
+
53
+
54
+ #username,
55
+ #password {
56
+ width: 10em;
57
+ }
58
+
59
+ #login-form {
60
+ padding: 20px;
61
+ }
62
+
63
+
64
+ #form-layout {
65
+ position: relative;
66
+ top: 6px;
67
+ width: 100%;
68
+ }
69
+
70
+ #form-layout td {
71
+ text-align: center;
72
+ padding-bottom: 8px;
73
+ }
74
+
75
+ #form-layout td#submit-container {
76
+ text-align: right;
77
+ padding-right: 10px;
78
+ }
79
+
80
+ #infoline {
81
+ font-size: 9px;
82
+ }
83
+
84
+ #messagebox-container {
85
+ padding-left: 11px;
86
+ padding-right: 16px;
87
+ }
88
+
89
+ div.messagebox {
90
+ font-size: 12px;
91
+ padding: 5px;
92
+ padding-left: 55px;
93
+ text-align: center;
94
+ width: 70%;
95
+ min-height: 34px;
96
+ vertical-align: middle;
97
+ }
98
+
99
+ div.mistake {
100
+ color: #d00;
101
+ background-image: url(warning.png);
102
+ background-repeat: no-repeat;
103
+ background-position: 10px 5px;
104
+ font-weight: bold;
105
+ }
106
+
107
+ div.confirmation {
108
+ color: #280;
109
+ background-image: url(ok.png);
110
+ background-repeat: no-repeat;
111
+ background-position: 10px 5px;
112
+ font-weight: bold;
113
+ }
114
+
115
+ div.notice {
116
+ color: #04c;
117
+ background-image: url(notice.png);
118
+ background-repeat: no-repeat;
119
+ background-position: 10px 5px;
120
+ font-weight: bold;
121
+ }