saml 0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. data/.travis.yml +6 -0
  2. data/README.md +71 -0
  3. data/lib/saml.rb +30 -0
  4. data/lib/saml/bindings.rb +17 -0
  5. data/lib/saml/bindings/http_post.rb +18 -0
  6. data/lib/saml/bindings/http_redirect.rb +72 -0
  7. data/lib/saml/core/assertion.rb +45 -0
  8. data/lib/saml/core/attribute.rb +25 -0
  9. data/lib/saml/core/attribute_statement.rb +20 -0
  10. data/lib/saml/core/authn_request.rb +15 -0
  11. data/lib/saml/core/authn_statement.rb +23 -0
  12. data/lib/saml/core/document.rb +25 -0
  13. data/lib/saml/core/logout_request.rb +24 -0
  14. data/lib/saml/core/request_abstract.rb +42 -0
  15. data/lib/saml/core/response.rb +28 -0
  16. data/lib/saml/core/status.rb +26 -0
  17. data/lib/saml/core/status_response.rb +24 -0
  18. data/lib/saml/core/subject.rb +13 -0
  19. data/lib/saml/core/xml_namespaces.rb +21 -0
  20. data/lib/saml/metadata/document.rb +14 -0
  21. data/lib/saml/metadata/endpoint.rb +22 -0
  22. data/lib/saml/metadata/entities_descriptor.rb +32 -0
  23. data/lib/saml/metadata/entity_descriptor.rb +40 -0
  24. data/lib/saml/metadata/idp_sso_descriptor.rb +25 -0
  25. data/lib/saml/metadata/indexed_endpoint.rb +19 -0
  26. data/lib/saml/metadata/key_descriptor.rb +21 -0
  27. data/lib/saml/metadata/role_descriptor.rb +21 -0
  28. data/lib/saml/metadata/sp_sso_descriptor.rb +23 -0
  29. data/lib/saml/metadata/sso_descriptor.rb +21 -0
  30. data/lib/saml/metadata/xml_namespaces.rb +19 -0
  31. data/lib/saml/session.rb +22 -0
  32. data/lib/saml/version.rb +3 -0
  33. data/saml.gemspec +24 -0
  34. data/spec/saml/bindings/http_redirect_spec.rb +49 -0
  35. data/spec/saml/core/assertion_spec.rb +50 -0
  36. data/spec/saml/core/attribute_spec.rb +36 -0
  37. data/spec/saml/core/attribute_statement_spec.rb +18 -0
  38. data/spec/saml/core/authn_request_spec.rb +39 -0
  39. data/spec/saml/core/authn_statement_spec.rb +17 -0
  40. data/spec/saml/core/logout_request_spec.rb +36 -0
  41. data/spec/saml/core/request_abstract_spec.rb +55 -0
  42. data/spec/saml/core/response_spec.rb +32 -0
  43. data/spec/saml/core/status_response_spec.rb +49 -0
  44. data/spec/saml/core/status_spec.rb +27 -0
  45. data/spec/saml/core/subject_spec.rb +17 -0
  46. data/spec/saml/metadata/endpoint_spec.rb +17 -0
  47. data/spec/saml/metadata/entities_descriptor_spec.rb +18 -0
  48. data/spec/saml/metadata/entity_descriptor_spec.rb +9 -0
  49. data/spec/saml/metadata/idp_sso_descriptor_spec.rb +10 -0
  50. data/spec/saml/metadata/indexed_endpoint_spec.rb +20 -0
  51. data/spec/saml/metadata/sp_sso_descriptor_spec.rb +8 -0
  52. data/spec/saml/metadata/sso_descriptor_spec.rb +9 -0
  53. data/spec/spec_helper.rb +20 -0
  54. metadata +131 -0
@@ -0,0 +1,18 @@
1
+ # EntitiesDescriptor
2
+ #
3
+ # SAML v2.0 Metadata
4
+ #
5
+ # Section 2.3.1
6
+ #
7
+ # http://docs.oasis-open.org/security/saml/v2.0/saml-metadata-2.0-os.pdf
8
+ #
9
+
10
+ require 'spec_helper'
11
+
12
+ module SAML
13
+ module Metadata
14
+ describe EntitiesDescriptor do
15
+
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,9 @@
1
+ require 'spec_helper'
2
+
3
+ module SAML
4
+ module Metadata
5
+ describe EntityDescriptor do
6
+
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,10 @@
1
+ require 'spec_helper'
2
+
3
+ module SAML
4
+ module Metadata
5
+ describe IDPSSODescriptor do
6
+
7
+
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,20 @@
1
+ # Status
2
+ #
3
+ # SAML v2.0 Metadata
4
+ #
5
+ # Section 2.2.3
6
+ #
7
+ # http://docs.oasis-open.org/security/saml/v2.0/saml-metadata-2.0-os.pdf
8
+ #
9
+
10
+ require 'spec_helper'
11
+
12
+ module SAML
13
+ module Metadata
14
+ describe IndexedEndpoint do
15
+
16
+ it { should be_kind_of Endpoint }
17
+
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,8 @@
1
+ require 'spec_helper'
2
+
3
+ module SAML
4
+ module Metadata
5
+ describe SPSSODescriptor do
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,9 @@
1
+ require 'spec_helper'
2
+
3
+ module SAML
4
+ module Metadata
5
+ describe SSODescriptor do
6
+
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,20 @@
1
+ require 'saml'
2
+
3
+ RSpec::Matchers.define :match_xpath do |xpath, text|
4
+ match do |doc|
5
+ match = REXML::XPath.match(doc, xpath)
6
+ not match.empty?
7
+ end
8
+
9
+ failure_message_for_should do |body|
10
+ "expected to find xml tag #{xpath} in:\n#{body}"
11
+ end
12
+
13
+ failure_message_for_should_not do |response|
14
+ "expected not to find xml tag #{xpath} in:\n#{body}"
15
+ end
16
+
17
+ description do
18
+ "have xml tag #{xpath}"
19
+ end
20
+ end
metadata ADDED
@@ -0,0 +1,131 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: saml
3
+ version: !ruby/object:Gem::Version
4
+ version: '0.1'
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Kjell-Magne Øierud
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-06-22 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: uuid
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: xml_signature
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ description: Partial implementation of the SAML Standard
47
+ email:
48
+ - kjellm@oierud.net
49
+ executables: []
50
+ extensions: []
51
+ extra_rdoc_files: []
52
+ files:
53
+ - .travis.yml
54
+ - README.md
55
+ - lib/saml.rb
56
+ - lib/saml/bindings.rb
57
+ - lib/saml/bindings/http_post.rb
58
+ - lib/saml/bindings/http_redirect.rb
59
+ - lib/saml/core/assertion.rb
60
+ - lib/saml/core/attribute.rb
61
+ - lib/saml/core/attribute_statement.rb
62
+ - lib/saml/core/authn_request.rb
63
+ - lib/saml/core/authn_statement.rb
64
+ - lib/saml/core/document.rb
65
+ - lib/saml/core/logout_request.rb
66
+ - lib/saml/core/request_abstract.rb
67
+ - lib/saml/core/response.rb
68
+ - lib/saml/core/status.rb
69
+ - lib/saml/core/status_response.rb
70
+ - lib/saml/core/subject.rb
71
+ - lib/saml/core/xml_namespaces.rb
72
+ - lib/saml/metadata/document.rb
73
+ - lib/saml/metadata/endpoint.rb
74
+ - lib/saml/metadata/entities_descriptor.rb
75
+ - lib/saml/metadata/entity_descriptor.rb
76
+ - lib/saml/metadata/idp_sso_descriptor.rb
77
+ - lib/saml/metadata/indexed_endpoint.rb
78
+ - lib/saml/metadata/key_descriptor.rb
79
+ - lib/saml/metadata/role_descriptor.rb
80
+ - lib/saml/metadata/sp_sso_descriptor.rb
81
+ - lib/saml/metadata/sso_descriptor.rb
82
+ - lib/saml/metadata/xml_namespaces.rb
83
+ - lib/saml/session.rb
84
+ - lib/saml/version.rb
85
+ - saml.gemspec
86
+ - spec/saml/bindings/http_redirect_spec.rb
87
+ - spec/saml/core/assertion_spec.rb
88
+ - spec/saml/core/attribute_spec.rb
89
+ - spec/saml/core/attribute_statement_spec.rb
90
+ - spec/saml/core/authn_request_spec.rb
91
+ - spec/saml/core/authn_statement_spec.rb
92
+ - spec/saml/core/logout_request_spec.rb
93
+ - spec/saml/core/request_abstract_spec.rb
94
+ - spec/saml/core/response_spec.rb
95
+ - spec/saml/core/status_response_spec.rb
96
+ - spec/saml/core/status_spec.rb
97
+ - spec/saml/core/subject_spec.rb
98
+ - spec/saml/metadata/endpoint_spec.rb
99
+ - spec/saml/metadata/entities_descriptor_spec.rb
100
+ - spec/saml/metadata/entity_descriptor_spec.rb
101
+ - spec/saml/metadata/idp_sso_descriptor_spec.rb
102
+ - spec/saml/metadata/indexed_endpoint_spec.rb
103
+ - spec/saml/metadata/sp_sso_descriptor_spec.rb
104
+ - spec/saml/metadata/sso_descriptor_spec.rb
105
+ - spec/spec_helper.rb
106
+ homepage: https://github.com/kjellm/skeleton
107
+ licenses:
108
+ - MIT
109
+ post_install_message:
110
+ rdoc_options: []
111
+ require_paths:
112
+ - lib
113
+ required_ruby_version: !ruby/object:Gem::Requirement
114
+ none: false
115
+ requirements:
116
+ - - ! '>='
117
+ - !ruby/object:Gem::Version
118
+ version: 1.8.7
119
+ required_rubygems_version: !ruby/object:Gem::Requirement
120
+ none: false
121
+ requirements:
122
+ - - ! '>='
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ requirements: []
126
+ rubyforge_project:
127
+ rubygems_version: 1.8.24
128
+ signing_key:
129
+ specification_version: 3
130
+ summary: Partial implementation of the SAML Standard
131
+ test_files: []