rsaml 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. data/LICENSE +0 -0
  2. data/README +13 -0
  3. data/Rakefile +136 -0
  4. data/lib/rsaml.rb +57 -0
  5. data/lib/rsaml/action.rb +57 -0
  6. data/lib/rsaml/action_namespace.rb +63 -0
  7. data/lib/rsaml/advice.rb +34 -0
  8. data/lib/rsaml/assertion.rb +192 -0
  9. data/lib/rsaml/attribute.rb +76 -0
  10. data/lib/rsaml/audience.rb +19 -0
  11. data/lib/rsaml/authentication_context.rb +34 -0
  12. data/lib/rsaml/authn_context/README +1 -0
  13. data/lib/rsaml/authn_context/authentication_context_declaration.rb +42 -0
  14. data/lib/rsaml/authn_context/identification.rb +10 -0
  15. data/lib/rsaml/authn_context/physical_verification.rb +24 -0
  16. data/lib/rsaml/condition.rb +13 -0
  17. data/lib/rsaml/conditions.rb +107 -0
  18. data/lib/rsaml/encrypted.rb +12 -0
  19. data/lib/rsaml/errors.rb +16 -0
  20. data/lib/rsaml/evidence.rb +21 -0
  21. data/lib/rsaml/ext/string.rb +5 -0
  22. data/lib/rsaml/identifier.rb +9 -0
  23. data/lib/rsaml/identifier/base.rb +23 -0
  24. data/lib/rsaml/identifier/issuer.rb +28 -0
  25. data/lib/rsaml/identifier/name.rb +55 -0
  26. data/lib/rsaml/parser.rb +23 -0
  27. data/lib/rsaml/protocol.rb +21 -0
  28. data/lib/rsaml/protocol/artifact_resolve.rb +14 -0
  29. data/lib/rsaml/protocol/assertion_id_request.rb +18 -0
  30. data/lib/rsaml/protocol/authn_request.rb +91 -0
  31. data/lib/rsaml/protocol/idp_entry.rb +18 -0
  32. data/lib/rsaml/protocol/idp_list.rb +28 -0
  33. data/lib/rsaml/protocol/message.rb +65 -0
  34. data/lib/rsaml/protocol/name_id_policy.rb +31 -0
  35. data/lib/rsaml/protocol/query.rb +12 -0
  36. data/lib/rsaml/protocol/query/attribute_query.rb +56 -0
  37. data/lib/rsaml/protocol/query/authn_query.rb +30 -0
  38. data/lib/rsaml/protocol/query/authz_decision_query.rb +40 -0
  39. data/lib/rsaml/protocol/query/subject_query.rb +22 -0
  40. data/lib/rsaml/protocol/request.rb +27 -0
  41. data/lib/rsaml/protocol/requested_authn_context.rb +34 -0
  42. data/lib/rsaml/protocol/response.rb +56 -0
  43. data/lib/rsaml/protocol/scoping.rb +33 -0
  44. data/lib/rsaml/protocol/status.rb +38 -0
  45. data/lib/rsaml/protocol/status_code.rb +84 -0
  46. data/lib/rsaml/proxy_restriction.rb +30 -0
  47. data/lib/rsaml/statement.rb +10 -0
  48. data/lib/rsaml/statement/attribute_statement.rb +27 -0
  49. data/lib/rsaml/statement/authentication_statement.rb +57 -0
  50. data/lib/rsaml/statement/authorization_decision_statement.rb +53 -0
  51. data/lib/rsaml/statement/base.rb +9 -0
  52. data/lib/rsaml/subject.rb +37 -0
  53. data/lib/rsaml/subject_confirmation.rb +35 -0
  54. data/lib/rsaml/subject_confirmation_data.rb +55 -0
  55. data/lib/rsaml/subject_locality.rb +27 -0
  56. data/lib/rsaml/validatable.rb +21 -0
  57. data/lib/rsaml/version.rb +9 -0
  58. data/lib/xml_enc.rb +3 -0
  59. data/lib/xml_sig.rb +11 -0
  60. data/lib/xml_sig/canonicalization_method.rb +43 -0
  61. data/lib/xml_sig/key_info.rb +55 -0
  62. data/lib/xml_sig/reference.rb +57 -0
  63. data/lib/xml_sig/signature.rb +29 -0
  64. data/lib/xml_sig/signature_method.rb +20 -0
  65. data/lib/xml_sig/signed_info.rb +27 -0
  66. data/lib/xml_sig/transform.rb +37 -0
  67. data/test/action_namespace_test.rb +93 -0
  68. data/test/action_test.rb +51 -0
  69. data/test/advice_test.rb +25 -0
  70. data/test/assertion_test.rb +192 -0
  71. data/test/attribute_test.rb +60 -0
  72. data/test/authentication_context_test.rb +26 -0
  73. data/test/conditions_test.rb +84 -0
  74. data/test/evidence_test.rb +33 -0
  75. data/test/identifier_test.rb +22 -0
  76. data/test/issuer_test.rb +33 -0
  77. data/test/name_test.rb +33 -0
  78. data/test/parser_test.rb +32 -0
  79. data/test/protocol/assertion_id_request_test.rb +19 -0
  80. data/test/protocol/attribute_query_test.rb +30 -0
  81. data/test/protocol/authn_query_test.rb +20 -0
  82. data/test/protocol/authn_request_test.rb +56 -0
  83. data/test/protocol/authz_decision_query_test.rb +31 -0
  84. data/test/protocol/idp_list_test.rb +15 -0
  85. data/test/protocol/request_test.rb +66 -0
  86. data/test/protocol/response_test.rb +68 -0
  87. data/test/protocol/scoping_test.rb +20 -0
  88. data/test/protocol/status_code_test.rb +34 -0
  89. data/test/protocol/status_test.rb +16 -0
  90. data/test/proxy_restriction_test.rb +20 -0
  91. data/test/rsaml_test.rb +12 -0
  92. data/test/statement_test.rb +101 -0
  93. data/test/subject_locality_test.rb +27 -0
  94. data/test/subject_test.rb +44 -0
  95. data/test/test_helper.rb +16 -0
  96. data/test/xml_sig/canonicalization_test.rb +19 -0
  97. metadata +187 -0
@@ -0,0 +1,16 @@
1
+ require 'test/unit'
2
+ require 'rubygems'
3
+ require 'shoulda'
4
+
5
+ require File.dirname(__FILE__) + '/../lib/rsaml'
6
+ include RSAML
7
+ include RSAML::Statement
8
+
9
+ class Test::Unit::TestCase
10
+ def date_match
11
+ '\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z'
12
+ end
13
+ def uuid_match
14
+ '[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}'
15
+ end
16
+ end
@@ -0,0 +1,19 @@
1
+ require File.dirname(__FILE__) + '/../test_helper'
2
+
3
+ class CanonicalizationTest < Test::Unit::TestCase
4
+ context "a c14n without comments" do
5
+ setup do
6
+ @c14n = XmlSig::XMLC14NWithoutComments.new
7
+ end
8
+ should "convert to UTF-8" do
9
+ assert_equal "Café ñ", @c14n.convert_to_utf8(File.read(File.dirname(__FILE__) + '/iso-8859-1.txt'), 'iso-8859-1')
10
+ end
11
+ should "convert line breaks" do
12
+ assert_equal "line1\nline2\n", @c14n.convert_linebreaks("line1\r\nline2\r")
13
+ assert_equal "\n", @c14n.convert_linebreaks("\n")
14
+ assert_equal "\n", @c14n.convert_linebreaks("\r")
15
+ assert_equal "\n", @c14n.convert_linebreaks("\r\n")
16
+ assert_equal "\n\n", @c14n.convert_linebreaks("\n\n")
17
+ end
18
+ end
19
+ end
metadata ADDED
@@ -0,0 +1,187 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rsaml
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 1
8
+ - 2
9
+ version: 0.1.2
10
+ platform: ruby
11
+ authors:
12
+ - Anthony Eden
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2010-08-27 00:00:00 -04:00
18
+ default_executable:
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: activesupport
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 2
29
+ - 3
30
+ - 4
31
+ version: 2.3.4
32
+ type: :runtime
33
+ version_requirements: *id001
34
+ - !ruby/object:Gem::Dependency
35
+ name: uuid
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ segments:
42
+ - 2
43
+ - 1
44
+ - 1
45
+ version: 2.1.1
46
+ type: :runtime
47
+ version_requirements: *id002
48
+ description: "RSAML is a SAML implementation in Ruby. RSAML currently implements the elements defined in the SAML-Core 2.0 \n specification by defining an object model that mimics the structure of SAML. Method names and attributes have been made \n ruby-friendly and documentation is provided for each class and method. In certain cases the SAML specification is \n referenced directly and should be considered the final say whenever a question arises regarding SAML implementation.\n "
49
+ email:
50
+ - anthonyeden@gmail.com
51
+ - scashin133@gmail.com
52
+ - elise@elisehuard.be
53
+ executables: []
54
+
55
+ extensions: []
56
+
57
+ extra_rdoc_files:
58
+ - LICENSE
59
+ - README
60
+ files:
61
+ - README
62
+ - Rakefile
63
+ - lib/rsaml.rb
64
+ - lib/rsaml/action.rb
65
+ - lib/rsaml/action_namespace.rb
66
+ - lib/rsaml/advice.rb
67
+ - lib/rsaml/assertion.rb
68
+ - lib/rsaml/attribute.rb
69
+ - lib/rsaml/audience.rb
70
+ - lib/rsaml/authentication_context.rb
71
+ - lib/rsaml/authn_context/README
72
+ - lib/rsaml/authn_context/authentication_context_declaration.rb
73
+ - lib/rsaml/authn_context/identification.rb
74
+ - lib/rsaml/authn_context/physical_verification.rb
75
+ - lib/rsaml/condition.rb
76
+ - lib/rsaml/conditions.rb
77
+ - lib/rsaml/encrypted.rb
78
+ - lib/rsaml/errors.rb
79
+ - lib/rsaml/evidence.rb
80
+ - lib/rsaml/ext/string.rb
81
+ - lib/rsaml/identifier.rb
82
+ - lib/rsaml/identifier/base.rb
83
+ - lib/rsaml/identifier/issuer.rb
84
+ - lib/rsaml/identifier/name.rb
85
+ - lib/rsaml/parser.rb
86
+ - lib/rsaml/protocol.rb
87
+ - lib/rsaml/protocol/artifact_resolve.rb
88
+ - lib/rsaml/protocol/assertion_id_request.rb
89
+ - lib/rsaml/protocol/authn_request.rb
90
+ - lib/rsaml/protocol/idp_entry.rb
91
+ - lib/rsaml/protocol/idp_list.rb
92
+ - lib/rsaml/protocol/message.rb
93
+ - lib/rsaml/protocol/name_id_policy.rb
94
+ - lib/rsaml/protocol/query.rb
95
+ - lib/rsaml/protocol/query/attribute_query.rb
96
+ - lib/rsaml/protocol/query/authn_query.rb
97
+ - lib/rsaml/protocol/query/authz_decision_query.rb
98
+ - lib/rsaml/protocol/query/subject_query.rb
99
+ - lib/rsaml/protocol/request.rb
100
+ - lib/rsaml/protocol/requested_authn_context.rb
101
+ - lib/rsaml/protocol/response.rb
102
+ - lib/rsaml/protocol/scoping.rb
103
+ - lib/rsaml/protocol/status.rb
104
+ - lib/rsaml/protocol/status_code.rb
105
+ - lib/rsaml/proxy_restriction.rb
106
+ - lib/rsaml/statement.rb
107
+ - lib/rsaml/statement/attribute_statement.rb
108
+ - lib/rsaml/statement/authentication_statement.rb
109
+ - lib/rsaml/statement/authorization_decision_statement.rb
110
+ - lib/rsaml/statement/base.rb
111
+ - lib/rsaml/subject.rb
112
+ - lib/rsaml/subject_confirmation.rb
113
+ - lib/rsaml/subject_confirmation_data.rb
114
+ - lib/rsaml/subject_locality.rb
115
+ - lib/rsaml/validatable.rb
116
+ - lib/rsaml/version.rb
117
+ - lib/xml_enc.rb
118
+ - lib/xml_sig.rb
119
+ - lib/xml_sig/canonicalization_method.rb
120
+ - lib/xml_sig/key_info.rb
121
+ - lib/xml_sig/reference.rb
122
+ - lib/xml_sig/signature.rb
123
+ - lib/xml_sig/signature_method.rb
124
+ - lib/xml_sig/signed_info.rb
125
+ - lib/xml_sig/transform.rb
126
+ - LICENSE
127
+ has_rdoc: true
128
+ homepage: http://github.com/aeden/rsaml
129
+ licenses: []
130
+
131
+ post_install_message:
132
+ rdoc_options:
133
+ - --charset=UTF-8
134
+ require_paths:
135
+ - lib
136
+ required_ruby_version: !ruby/object:Gem::Requirement
137
+ requirements:
138
+ - - ">="
139
+ - !ruby/object:Gem::Version
140
+ segments:
141
+ - 0
142
+ version: "0"
143
+ required_rubygems_version: !ruby/object:Gem::Requirement
144
+ requirements:
145
+ - - ">="
146
+ - !ruby/object:Gem::Version
147
+ segments:
148
+ - 0
149
+ version: "0"
150
+ requirements: []
151
+
152
+ rubyforge_project:
153
+ rubygems_version: 1.3.6
154
+ signing_key:
155
+ specification_version: 3
156
+ summary: Ruby implementation of the SAML 2.0 Specification
157
+ test_files:
158
+ - test/action_namespace_test.rb
159
+ - test/action_test.rb
160
+ - test/advice_test.rb
161
+ - test/assertion_test.rb
162
+ - test/attribute_test.rb
163
+ - test/authentication_context_test.rb
164
+ - test/conditions_test.rb
165
+ - test/evidence_test.rb
166
+ - test/identifier_test.rb
167
+ - test/issuer_test.rb
168
+ - test/name_test.rb
169
+ - test/parser_test.rb
170
+ - test/protocol/assertion_id_request_test.rb
171
+ - test/protocol/attribute_query_test.rb
172
+ - test/protocol/authn_query_test.rb
173
+ - test/protocol/authn_request_test.rb
174
+ - test/protocol/authz_decision_query_test.rb
175
+ - test/protocol/idp_list_test.rb
176
+ - test/protocol/request_test.rb
177
+ - test/protocol/response_test.rb
178
+ - test/protocol/scoping_test.rb
179
+ - test/protocol/status_code_test.rb
180
+ - test/protocol/status_test.rb
181
+ - test/proxy_restriction_test.rb
182
+ - test/rsaml_test.rb
183
+ - test/statement_test.rb
184
+ - test/subject_locality_test.rb
185
+ - test/subject_test.rb
186
+ - test/test_helper.rb
187
+ - test/xml_sig/canonicalization_test.rb