custom-adal 1.0.1

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 (98) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +6 -0
  3. data/.rubocop.yml +7 -0
  4. data/.travis.yml +7 -0
  5. data/Gemfile +25 -0
  6. data/LICENSE.txt +21 -0
  7. data/README.md +106 -0
  8. data/Rakefile +39 -0
  9. data/adal.gemspec +52 -0
  10. data/contributing.md +127 -0
  11. data/lib/adal/authentication_context.rb +202 -0
  12. data/lib/adal/authentication_parameters.rb +126 -0
  13. data/lib/adal/authority.rb +165 -0
  14. data/lib/adal/cache_driver.rb +171 -0
  15. data/lib/adal/cached_token_response.rb +190 -0
  16. data/lib/adal/client_assertion.rb +63 -0
  17. data/lib/adal/client_assertion_certificate.rb +89 -0
  18. data/lib/adal/client_credential.rb +46 -0
  19. data/lib/adal/core_ext/hash.rb +34 -0
  20. data/lib/adal/core_ext.rb +26 -0
  21. data/lib/adal/jwt_parameters.rb +39 -0
  22. data/lib/adal/logger.rb +90 -0
  23. data/lib/adal/logging.rb +98 -0
  24. data/lib/adal/memory_cache.rb +95 -0
  25. data/lib/adal/mex_request.rb +52 -0
  26. data/lib/adal/mex_response.rb +141 -0
  27. data/lib/adal/noop_cache.rb +38 -0
  28. data/lib/adal/oauth_request.rb +76 -0
  29. data/lib/adal/request_parameters.rb +48 -0
  30. data/lib/adal/self_signed_jwt_factory.rb +96 -0
  31. data/lib/adal/templates/rst.13.xml.erb +35 -0
  32. data/lib/adal/templates/rst.2005.xml.erb +32 -0
  33. data/lib/adal/token_request.rb +231 -0
  34. data/lib/adal/token_response.rb +144 -0
  35. data/lib/adal/user_assertion.rb +57 -0
  36. data/lib/adal/user_credential.rb +152 -0
  37. data/lib/adal/user_identifier.rb +83 -0
  38. data/lib/adal/user_information.rb +49 -0
  39. data/lib/adal/util.rb +49 -0
  40. data/lib/adal/version.rb +36 -0
  41. data/lib/adal/wstrust_request.rb +100 -0
  42. data/lib/adal/wstrust_response.rb +168 -0
  43. data/lib/adal/xml_namespaces.rb +64 -0
  44. data/lib/adal.rb +24 -0
  45. data/samples/authorization_code_example/README.md +10 -0
  46. data/samples/authorization_code_example/web_app.rb +139 -0
  47. data/samples/client_assertion_certificate_example/README.md +42 -0
  48. data/samples/client_assertion_certificate_example/app.rb +55 -0
  49. data/samples/on_behalf_of_example/README.md +35 -0
  50. data/samples/on_behalf_of_example/native_app.rb +52 -0
  51. data/samples/on_behalf_of_example/web_api.rb +71 -0
  52. data/samples/user_credentials_example/README.md +7 -0
  53. data/samples/user_credentials_example/app.rb +52 -0
  54. data/spec/adal/authentication_context_spec.rb +186 -0
  55. data/spec/adal/authentication_parameters_spec.rb +107 -0
  56. data/spec/adal/authority_spec.rb +122 -0
  57. data/spec/adal/cache_driver_spec.rb +191 -0
  58. data/spec/adal/cached_token_response_spec.rb +148 -0
  59. data/spec/adal/client_assertion_certificate_spec.rb +113 -0
  60. data/spec/adal/client_assertion_spec.rb +38 -0
  61. data/spec/adal/core_ext/hash_spec.rb +47 -0
  62. data/spec/adal/logging_spec.rb +48 -0
  63. data/spec/adal/memory_cache_spec.rb +107 -0
  64. data/spec/adal/mex_request_spec.rb +57 -0
  65. data/spec/adal/mex_response_spec.rb +143 -0
  66. data/spec/adal/self_signed_jwt_factory_spec.rb +63 -0
  67. data/spec/adal/token_request_spec.rb +150 -0
  68. data/spec/adal/token_response_spec.rb +102 -0
  69. data/spec/adal/user_credential_spec.rb +125 -0
  70. data/spec/adal/user_identifier_spec.rb +115 -0
  71. data/spec/adal/wstrust_request_spec.rb +51 -0
  72. data/spec/adal/wstrust_response_spec.rb +152 -0
  73. data/spec/fixtures/mex/insecureaddress.xml +924 -0
  74. data/spec/fixtures/mex/invalid_namespaces.xml +916 -0
  75. data/spec/fixtures/mex/malformed.xml +914 -0
  76. data/spec/fixtures/mex/microsoft.xml +916 -0
  77. data/spec/fixtures/mex/multiple_endpoints.xml +922 -0
  78. data/spec/fixtures/mex/no_matching_bindings.xml +916 -0
  79. data/spec/fixtures/mex/no_username_token_policies.xml +914 -0
  80. data/spec/fixtures/mex/no_wstrust_endpoints.xml +838 -0
  81. data/spec/fixtures/mex/only_13.xml +842 -0
  82. data/spec/fixtures/mex/only_2005.xml +842 -0
  83. data/spec/fixtures/oauth/error.json +1 -0
  84. data/spec/fixtures/oauth/success.json +1 -0
  85. data/spec/fixtures/oauth/success_with_id_token.json +1 -0
  86. data/spec/fixtures/wstrust/error.xml +24 -0
  87. data/spec/fixtures/wstrust/invalid_namespaces.xml +136 -0
  88. data/spec/fixtures/wstrust/missing_security_tokens.xml +90 -0
  89. data/spec/fixtures/wstrust/success.xml +136 -0
  90. data/spec/fixtures/wstrust/token.xml +1 -0
  91. data/spec/fixtures/wstrust/too_many_security_tokens.xml +219 -0
  92. data/spec/fixtures/wstrust/unrecognized_token_type.xml +136 -0
  93. data/spec/fixtures/wstrust/wstrust.13.xml +1 -0
  94. data/spec/fixtures/wstrust/wstrust.2005.xml +89 -0
  95. data/spec/spec_helper.rb +53 -0
  96. data/spec/support/fake_data.rb +40 -0
  97. data/spec/support/fake_token_endpoint.rb +108 -0
  98. metadata +264 -0
@@ -0,0 +1,219 @@
1
+ <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope"
2
+ xmlns:a="http://www.w3.org/2005/08/addressing"
3
+ xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
4
+ <s:Header>
5
+ <a:Action s:mustUnderstand="1">http://docs.oasis-open.org/ws-sx/ws-trust/200512/RSTRC/IssueFinal</a:Action>
6
+ <o:Security s:mustUnderstand="1"
7
+ xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
8
+ <u:Timestamp u:Id="_0">
9
+ <u:Created>2014-10-11T01:57:52.927Z</u:Created>
10
+ <u:Expires>2014-10-11T02:02:52.927Z</u:Expires>
11
+ </u:Timestamp>
12
+ </o:Security>
13
+ </s:Header>
14
+ <s:Body>
15
+ <trust:RequestSecurityTokenResponseCollection
16
+ xmlns:trust="http://docs.oasis-open.org/ws-sx/ws-trust/200512">
17
+ <trust:RequestSecurityTokenResponse>
18
+ <trust:Lifetime>
19
+ <wsu:Created
20
+ xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2014-10-11T01:57:52.802Z</wsu:Created>
21
+ <wsu:Expires
22
+ xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2014-10-11T02:57:52.802Z</wsu:Expires>
23
+ </trust:Lifetime>
24
+ <wsp:AppliesTo xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
25
+ <wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
26
+ <wsa:Address>urn:federation:MicrosoftOnline</wsa:Address>
27
+ </wsa:EndpointReference>
28
+ </wsp:AppliesTo>
29
+ <trust:RequestedSecurityToken>
30
+ <saml:Assertion MajorVersion="1" MinorVersion="1"
31
+ AssertionID="_3ad77714-87a7-4ec5-b3e8-dfd2ef68a49e" Issuer="urn:federation:MSFT"
32
+ IssueInstant="2014-10-11T01:57:52.927Z" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion">
33
+ <saml:Conditions NotBefore="2014-10-11T01:57:52.802Z"
34
+ NotOnOrAfter="2014-10-11T02:57:52.802Z">
35
+ <saml:AudienceRestrictionCondition>
36
+ <saml:Audience>urn:federation:MicrosoftOnline</saml:Audience>
37
+ </saml:AudienceRestrictionCondition>
38
+ </saml:Conditions>
39
+ <saml:AttributeStatement>
40
+ <saml:Subject>
41
+ <saml:NameIdentifier
42
+ Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">11111</saml:NameIdentifier>
43
+ <saml:SubjectConfirmation>
44
+ <saml:ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:bearer
45
+ </saml:ConfirmationMethod>
46
+ </saml:SubjectConfirmation>
47
+ </saml:Subject>
48
+ <saml:Attribute AttributeName="UPN"
49
+ AttributeNamespace="http://schemas.xmlsoap.org/claims">
50
+ <saml:AttributeValue>sdfb4@vsfdbs.com</saml:AttributeValue>
51
+ </saml:Attribute>
52
+ <saml:Attribute AttributeName="objectGUID"
53
+ AttributeNamespace="http://tempuri.com">
54
+ <saml:AttributeValue>sefgbw4w4tbwrtb==
55
+ </saml:AttributeValue>
56
+ </saml:Attribute>
57
+ <saml:Attribute AttributeName="PersonnelNumber"
58
+ AttributeNamespace="http://schemas.xmlsoap.org/claims">
59
+ <saml:AttributeValue>11111</saml:AttributeValue>
60
+ </saml:Attribute>
61
+ <saml:Attribute AttributeName="ImmutableID"
62
+ AttributeNamespace="http://schemas.microsoft.com/LiveID/Federation/2008/05">
63
+ <saml:AttributeValue>11111</saml:AttributeValue>
64
+ </saml:Attribute>
65
+ <saml:Attribute AttributeName="insidecorporatenetwork"
66
+ AttributeNamespace="http://schemas.microsoft.com/ws/2012/01">
67
+ <saml:AttributeValue>true</saml:AttributeValue>
68
+ </saml:Attribute>
69
+ <saml:Attribute AttributeName="psso"
70
+ AttributeNamespace="http://schemas.microsoft.com/2014/03">
71
+ <saml:AttributeValue>true</saml:AttributeValue>
72
+ </saml:Attribute>
73
+ </saml:AttributeStatement>
74
+ <saml:AuthenticationStatement
75
+ AuthenticationMethod="urn:oasis:names:tc:SAML:1.0:am:password"
76
+ AuthenticationInstant="2014-10-11T01:57:52.786Z">
77
+ <saml:Subject>
78
+ <saml:NameIdentifier
79
+ Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">11111</saml:NameIdentifier>
80
+ <saml:SubjectConfirmation>
81
+ <saml:ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:bearer
82
+ </saml:ConfirmationMethod>
83
+ </saml:SubjectConfirmation>
84
+ </saml:Subject>
85
+ </saml:AuthenticationStatement>
86
+ <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
87
+ <ds:SignedInfo>
88
+ <ds:CanonicalizationMethod
89
+ Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
90
+ <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
91
+ <ds:Reference URI="#_3ad77714-87a7-4ec5-b3e8-dfd2ef68a49e">
92
+ <ds:Transforms>
93
+ <ds:Transform
94
+ Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
95
+ <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
96
+ </ds:Transforms>
97
+ <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
98
+ <ds:DigestValue>11112412434fgvwefb24rb=</ds:DigestValue>
99
+ </ds:Reference>
100
+ </ds:SignedInfo>
101
+ <ds:SignatureValue>yc2hltEY1z/0zgEdUKdIo9K8BAauLYCvEM21Jrasdnvkadsjv9834759384utfhwrgEDSDGSDFG34543fFFwdffeeeeCfnoRal7Q1PXtxwsDqg/maesA7/1eYG75Q6/MyB5s+GZqUDK5Sif1XXseTe3hbocz/dMfVIeHKZ/BJ9iKdjI+WhDJspJ282sCu9e31h0CKEEgHwwe3U+0iwtwXrBxJKi9wNrrShez7CW+18jz2bQ+hFxsLYpuXSskOgeB6wza5BR9QjLHjjntqchVZOgZNQzmnULQBXIbPHGvrcKZZ1+05y27505B8T1jOopN6ncdic2b3tt712n/lDbtQCBKOUp5A0ZIP8nupkUE4lvIE0qFiETrWFKbRKgNLzPSS8Fb0ITuq5FPQRNDZkYebVqBvQavd7T8qx9RnhXwJNYBABxZ2NgicCT1QnAhPwyU4vvMaSeCbguAsbO0z6IM9Y6pzLe6eehvzh2/WfIckEExeHvPTEZZWMiA16msBSWLX+NkVMLfVBj8GA2sK7Qj4wnvK6ip+8x5PBl5z3Ra8p7MXsDVnunZcl5LnjBM7Z0puX9vT79xVuJ7+q3jD6GRjiH0XZr4yZXCJk2Ipfq9P4S+8fT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FAAOCAgEAQbiCZJWFH9zaGaPlT77Jq9bWoH6fqZRrNIDuVXM7h+g7E8Xj5Demi16WrRSTR8Ff1uNV0n5tdbLu4C9rEU4RrZjFOJXGGsQZD85y8Jq3tcZ6RZSU6ie3tzvpl5Yhe0o1xfuUvI43VxJWFzW7LHzHyzoDeFNhSuplWfGkQfdjs9yGLTYflIDVCigXv94Wv949HckiG1+PST9ai9jST6NCkeqElm5zoZHxo+haYIRMma4lL7/AO3uYhey5bKYyIHyWTAZcJBKqO2RrWuOtZWthK/gL0yTeGrGXFQvHbfUwEA/lBdUka/x8m59hzSCS2c0f/GZbrBGq6mOrl4NSrJSck4KJnQDbdYzyP2kIVWwjlYMNbFWXE0e2lxm6T28Znhh0wtqrBDyQIxDFpt/bdw9I5OsXmXvjRYlVXP1gmHebuhL9wA3A9BKUaTNf2BTfvWdYnBwbRq98vB4RSAwWRLjv9bizB9JkmMUSmPS9Z5juPMmkbTpcmn8RUUPLGDpuFYMB0dXpGtG+oJ40wHeYZCvfBU1tuXuB+RTxkPsXzF4WEf6sei0VCgs+ir0mULF9L++Bc0INn9VpZoOpDE9pX7jMn9jkutClaxVOirysvYcOAy092MHo3uR6opH9U9vzWJrQULxPOdT+GVwLJ2ZgSmYC14tsr37vbC8WAD5E1zyfGPU=
106
+ </X509Certificate>
107
+ </X509Data>
108
+ </KeyInfo>
109
+ </ds:Signature>
110
+ </saml:Assertion>
111
+ </trust:RequestedSecurityToken>
112
+ <trust:RequestedSecurityToken>
113
+ <saml:Assertion MajorVersion="1" MinorVersion="1"
114
+ AssertionID="_3ad77714-87a7-4ec5-b3e8-dfd2ef68a49e" Issuer="urn:federation:MSFT"
115
+ IssueInstant="2014-10-11T01:57:52.927Z" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion">
116
+ <saml:Conditions NotBefore="2014-10-11T01:57:52.802Z"
117
+ NotOnOrAfter="2014-10-11T02:57:52.802Z">
118
+ <saml:AudienceRestrictionCondition>
119
+ <saml:Audience>urn:federation:MicrosoftOnline</saml:Audience>
120
+ </saml:AudienceRestrictionCondition>
121
+ </saml:Conditions>
122
+ <saml:AttributeStatement>
123
+ <saml:Subject>
124
+ <saml:NameIdentifier
125
+ Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">11111</saml:NameIdentifier>
126
+ <saml:SubjectConfirmation>
127
+ <saml:ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:bearer
128
+ </saml:ConfirmationMethod>
129
+ </saml:SubjectConfirmation>
130
+ </saml:Subject>
131
+ <saml:Attribute AttributeName="UPN"
132
+ AttributeNamespace="http://schemas.xmlsoap.org/claims">
133
+ <saml:AttributeValue>sdfb4@vsfdbs.com</saml:AttributeValue>
134
+ </saml:Attribute>
135
+ <saml:Attribute AttributeName="objectGUID"
136
+ AttributeNamespace="http://tempuri.com">
137
+ <saml:AttributeValue>sefgbw4w4tbwrtb==
138
+ </saml:AttributeValue>
139
+ </saml:Attribute>
140
+ <saml:Attribute AttributeName="PersonnelNumber"
141
+ AttributeNamespace="http://schemas.xmlsoap.org/claims">
142
+ <saml:AttributeValue>11111</saml:AttributeValue>
143
+ </saml:Attribute>
144
+ <saml:Attribute AttributeName="ImmutableID"
145
+ AttributeNamespace="http://schemas.microsoft.com/LiveID/Federation/2008/05">
146
+ <saml:AttributeValue>11111</saml:AttributeValue>
147
+ </saml:Attribute>
148
+ <saml:Attribute AttributeName="insidecorporatenetwork"
149
+ AttributeNamespace="http://schemas.microsoft.com/ws/2012/01">
150
+ <saml:AttributeValue>true</saml:AttributeValue>
151
+ </saml:Attribute>
152
+ <saml:Attribute AttributeName="psso"
153
+ AttributeNamespace="http://schemas.microsoft.com/2014/03">
154
+ <saml:AttributeValue>true</saml:AttributeValue>
155
+ </saml:Attribute>
156
+ </saml:AttributeStatement>
157
+ <saml:AuthenticationStatement
158
+ AuthenticationMethod="urn:oasis:names:tc:SAML:1.0:am:password"
159
+ AuthenticationInstant="2014-10-11T01:57:52.786Z">
160
+ <saml:Subject>
161
+ <saml:NameIdentifier
162
+ Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">11111</saml:NameIdentifier>
163
+ <saml:SubjectConfirmation>
164
+ <saml:ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:bearer
165
+ </saml:ConfirmationMethod>
166
+ </saml:SubjectConfirmation>
167
+ </saml:Subject>
168
+ </saml:AuthenticationStatement>
169
+ <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
170
+ <ds:SignedInfo>
171
+ <ds:CanonicalizationMethod
172
+ Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
173
+ <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
174
+ <ds:Reference URI="#_3ad77714-87a7-4ec5-b3e8-dfd2ef68a49e">
175
+ <ds:Transforms>
176
+ <ds:Transform
177
+ Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
178
+ <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
179
+ </ds:Transforms>
180
+ <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
181
+ <ds:DigestValue>11112412434fgvwefb24rb=</ds:DigestValue>
182
+ </ds:Reference>
183
+ </ds:SignedInfo>
184
+ <ds:SignatureValue>yc2hltEY1z/0zgEdUKdIo9K8BAauLYCvEM21Jrasdnvkadsjv9834759384utfhwrgEDSDGSDFG34543fFFwdffeeeeCfnoRal7Q1PXtxwsDqg/maesA7/1eYG75Q6/MyB5s+GZqUDK5Sif1XXseTe3hbocz/dMfVIeHKZ/BJ9iKdjI+WhDJspJ282sCu9e31h0CKEEgHwwe3U+0iwtwXrBxJKi9wNrrShez7CW+18jz2bQ+hFxsLYpuXSskOgeB6wza5BR9QjLHjjntqchVZOgZNQzmnULQBXIbPHGvrcKZZ1+05y27505B8T1jOopN6ncdic2b3tt712n/lDbtQCBKOUp5A0ZIP8nupkUE4lvIE0qFiETrWFKbRKgNLzPSS8Fb0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/PdZc7nl2Alvuiw1Wk6M3C2xcS8Hpu9unnacXujRr/FbgnaKwnAgMBAAGjdTBzMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATBSBgNVHQEESzBJgBBsOlmxcrgqKZ1x+s8zuEDRoSMwITEfMB0GA1UEAxMWbXNmdC5zdHMubWljcm9zb2Z0LmNvbYIQYvo/wNRpcL5JZi8e/Z4hBzANBgkqhkiG9w0BAQsFAAOCAgEAQbiCZJWFH9zaGaPlT77Jq9bWoH6fqZRrNIDuVXM7h+g7E8Xj5Demi16WrRSTR8Ff1uNV0n5tdbLu4C9rEU4RrZjFOJXGGsQZD85y8Jq3tcZ6RZSU6ie3tzvpl5Yhe0o1xfuUvI43VxJWFzW7LHzHyzoDeFNhSuplWfGkQfdjs9yGLTYflIDVCigXv94Wv949HckiG1+PST9ai9jST6NCkeqElm5zoZHxo+haYIRMma4lL7/AO3uYhey5bKYyIHyWTAZcJBKqO2RrWuOtZWthK/gL0yTeGrGXFQvHbfUwEA/lBdUka/x8m59hzSCS2c0f/GZbrBGq6mOrl4NSrJSck4KJnQDbdYzyP2kIVWwjlYMNbFWXE0e2lxm6T28Znhh0wtqrBDyQIxDFpt/bdw9I5OsXmXvjRYlVXP1gmHebuhL9wA3A9BKUaTNf2BTfvWdYnBwbRq98vB4RSAwWRLjv9bizB9JkmMUSmPS9Z5juPMmkbTpcmn8RUUPLGDpuFYMB0dXpGtG+oJ40wHeYZCvfBU1tuXuB+RTxkPsXzF4WEf6sei0VCgs+ir0mULF9L++Bc0INn9VpZoOpDE9pX7jMn9jkutClaxVOirysvYcOAy092MHo3uR6opH9U9vzWJrQULxPOdT+GVwLJ2ZgSmYC14tsr37vbC8WAD5E1zyfGPU=
189
+ </X509Certificate>
190
+ </X509Data>
191
+ </KeyInfo>
192
+ </ds:Signature>
193
+ </saml:Assertion>
194
+ </trust:RequestedSecurityToken>
195
+ <trust:RequestedAttachedReference>
196
+ <o:SecurityTokenReference
197
+ k:TokenType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1"
198
+ xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
199
+ xmlns:k="http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd">
200
+ <o:KeyIdentifier
201
+ ValueType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.0#SAMLAssertionID">_3ad77714-87a7-4ec5-b3e8-dfd2ef68a49e</o:KeyIdentifier>
202
+ </o:SecurityTokenReference>
203
+ </trust:RequestedAttachedReference>
204
+ <trust:RequestedUnattachedReference>
205
+ <o:SecurityTokenReference
206
+ k:TokenType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1"
207
+ xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
208
+ xmlns:k="http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd">
209
+ <o:KeyIdentifier
210
+ ValueType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.0#SAMLAssertionID">_3ad77714-87a7-4ec5-b3e8-dfd2ef68a49e</o:KeyIdentifier>
211
+ </o:SecurityTokenReference>
212
+ </trust:RequestedUnattachedReference>
213
+ <trust:TokenType>urn:oasis:names:tc:SAML:1.0:assertion</trust:TokenType>
214
+ <trust:RequestType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/Issue</trust:RequestType>
215
+ <trust:KeyType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/Bearer</trust:KeyType>
216
+ </trust:RequestSecurityTokenResponse>
217
+ </trust:RequestSecurityTokenResponseCollection>
218
+ </s:Body>
219
+ </s:Envelope>
@@ -0,0 +1,136 @@
1
+ <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope"
2
+ xmlns:a="http://www.w3.org/2005/08/addressing"
3
+ xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
4
+ <s:Header>
5
+ <a:Action s:mustUnderstand="1">http://docs.oasis-open.org/ws-sx/ws-trust/200512/RSTRC/IssueFinal</a:Action>
6
+ <o:Security s:mustUnderstand="1"
7
+ xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
8
+ <u:Timestamp u:Id="_0">
9
+ <u:Created>2014-10-11T01:57:52.927Z</u:Created>
10
+ <u:Expires>2014-10-11T02:02:52.927Z</u:Expires>
11
+ </u:Timestamp>
12
+ </o:Security>
13
+ </s:Header>
14
+ <s:Body>
15
+ <trust:RequestSecurityTokenResponseCollection
16
+ xmlns:trust="http://docs.oasis-open.org/ws-sx/ws-trust/200512">
17
+ <trust:RequestSecurityTokenResponse>
18
+ <trust:Lifetime>
19
+ <wsu:Created
20
+ xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2014-10-11T01:57:52.802Z</wsu:Created>
21
+ <wsu:Expires
22
+ xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2014-10-11T02:57:52.802Z</wsu:Expires>
23
+ </trust:Lifetime>
24
+ <wsp:AppliesTo xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
25
+ <wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
26
+ <wsa:Address>urn:federation:MicrosoftOnline</wsa:Address>
27
+ </wsa:EndpointReference>
28
+ </wsp:AppliesTo>
29
+ <trust:RequestedSecurityToken>
30
+ <saml:Assertion MajorVersion="1" MinorVersion="1"
31
+ AssertionID="_3ad77714-87a7-4ec5-b3e8-dfd2ef68a49e" Issuer="urn:federation:MSFT"
32
+ IssueInstant="2014-10-11T01:57:52.927Z" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion">
33
+ <saml:Conditions NotBefore="2014-10-11T01:57:52.802Z"
34
+ NotOnOrAfter="2014-10-11T02:57:52.802Z">
35
+ <saml:AudienceRestrictionCondition>
36
+ <saml:Audience>urn:federation:MicrosoftOnline</saml:Audience>
37
+ </saml:AudienceRestrictionCondition>
38
+ </saml:Conditions>
39
+ <saml:AttributeStatement>
40
+ <saml:Subject>
41
+ <saml:NameIdentifier
42
+ Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">11111</saml:NameIdentifier>
43
+ <saml:SubjectConfirmation>
44
+ <saml:ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:bearer
45
+ </saml:ConfirmationMethod>
46
+ </saml:SubjectConfirmation>
47
+ </saml:Subject>
48
+ <saml:Attribute AttributeName="UPN"
49
+ AttributeNamespace="http://schemas.xmlsoap.org/claims">
50
+ <saml:AttributeValue>sdfb4@vsfdbs.com</saml:AttributeValue>
51
+ </saml:Attribute>
52
+ <saml:Attribute AttributeName="objectGUID"
53
+ AttributeNamespace="http://tempuri.com">
54
+ <saml:AttributeValue>sefgbw4w4tbwrtb==
55
+ </saml:AttributeValue>
56
+ </saml:Attribute>
57
+ <saml:Attribute AttributeName="PersonnelNumber"
58
+ AttributeNamespace="http://schemas.xmlsoap.org/claims">
59
+ <saml:AttributeValue>11111</saml:AttributeValue>
60
+ </saml:Attribute>
61
+ <saml:Attribute AttributeName="ImmutableID"
62
+ AttributeNamespace="http://schemas.microsoft.com/LiveID/Federation/2008/05">
63
+ <saml:AttributeValue>11111</saml:AttributeValue>
64
+ </saml:Attribute>
65
+ <saml:Attribute AttributeName="insidecorporatenetwork"
66
+ AttributeNamespace="http://schemas.microsoft.com/ws/2012/01">
67
+ <saml:AttributeValue>true</saml:AttributeValue>
68
+ </saml:Attribute>
69
+ <saml:Attribute AttributeName="psso"
70
+ AttributeNamespace="http://schemas.microsoft.com/2014/03">
71
+ <saml:AttributeValue>true</saml:AttributeValue>
72
+ </saml:Attribute>
73
+ </saml:AttributeStatement>
74
+ <saml:AuthenticationStatement
75
+ AuthenticationMethod="urn:oasis:names:tc:SAML:1.0:am:password"
76
+ AuthenticationInstant="2014-10-11T01:57:52.786Z">
77
+ <saml:Subject>
78
+ <saml:NameIdentifier
79
+ Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">11111</saml:NameIdentifier>
80
+ <saml:SubjectConfirmation>
81
+ <saml:ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:bearer
82
+ </saml:ConfirmationMethod>
83
+ </saml:SubjectConfirmation>
84
+ </saml:Subject>
85
+ </saml:AuthenticationStatement>
86
+ <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
87
+ <ds:SignedInfo>
88
+ <ds:CanonicalizationMethod
89
+ Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
90
+ <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
91
+ <ds:Reference URI="#_3ad77714-87a7-4ec5-b3e8-dfd2ef68a49e">
92
+ <ds:Transforms>
93
+ <ds:Transform
94
+ Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
95
+ <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
96
+ </ds:Transforms>
97
+ <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
98
+ <ds:DigestValue>11112412434fgvwefb24rb=</ds:DigestValue>
99
+ </ds:Reference>
100
+ </ds:SignedInfo>
101
+ <ds:SignatureValue>yc2hltEY1z/0zgEdUKdIo9K8BAauLYCvEM21Jrasdnvkadsjv9834759384utfhwrgEDSDGSDFG34543fFFwdffeeeeCfnoRal7Q1PXtxwsDqg/maesA7/1eYG75Q6/MyB5s+GZqUDK5Sif1XXseTe3hbocz/dMfVIeHKZ/BJ9iKdjI+WhDJspJ282sCu9e31h0CKEEgHwwe3U+0iwtwXrBxJKi9wNrrShez7CW+18jz2bQ+hFxsLYpuXSskOgeB6wza5BR9QjLHjjntqchVZOgZNQzmnULQBXIbPHGvrcKZZ1+05y27505B8T1jOopN6ncdic2b3tt712n/lDbtQ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112
+ <trust:RequestedAttachedReference>
113
+ <o:SecurityTokenReference
114
+ k:TokenType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1"
115
+ xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
116
+ xmlns:k="http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd">
117
+ <o:KeyIdentifier
118
+ ValueType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.0#SAMLAssertionID">_3ad77714-87a7-4ec5-b3e8-dfd2ef68a49e</o:KeyIdentifier>
119
+ </o:SecurityTokenReference>
120
+ </trust:RequestedAttachedReference>
121
+ <trust:RequestedUnattachedReference>
122
+ <o:SecurityTokenReference
123
+ k:TokenType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1"
124
+ xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
125
+ xmlns:k="http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd">
126
+ <o:KeyIdentifier
127
+ ValueType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.0#SAMLAssertionID">_3ad77714-87a7-4ec5-b3e8-dfd2ef68a49e</o:KeyIdentifier>
128
+ </o:SecurityTokenReference>
129
+ </trust:RequestedUnattachedReference>
130
+ <trust:TokenType>urn:oasis:names:tc:SAML:3.0:assertion</trust:TokenType>
131
+ <trust:RequestType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/Issue</trust:RequestType>
132
+ <trust:KeyType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/Bearer</trust:KeyType>
133
+ </trust:RequestSecurityTokenResponse>
134
+ </trust:RequestSecurityTokenResponseCollection>
135
+ </s:Body>
136
+ </s:Envelope>
@@ -0,0 +1 @@
1
+ <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><s:Header><a:Action s:mustUnderstand="1">http://docs.oasis-open.org/ws-sx/ws-trust/200512/RSTRC/IssueFinal</a:Action><o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><u:Timestamp u:Id="_0"><u:Created>2015-07-31T18:52:50.806Z</u:Created><u:Expires>2015-07-31T18:57:50.806Z</u:Expires></u:Timestamp></o:Security></s:Header><s:Body><trust:RequestSecurityTokenResponseCollection xmlns:trust="http://docs.oasis-open.org/ws-sx/ws-trust/200512"><trust:RequestSecurityTokenResponse><trust:Lifetime><wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2015-07-31T18:52:50.806Z</wsu:Created><wsu:Expires xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2015-07-31T19:52:50.806Z</wsu:Expires></trust:Lifetime><wsp:AppliesTo xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"><wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:Address>urn:federation:MicrosoftOnline</wsa:Address></wsa:EndpointReference></wsp:AppliesTo><trust:RequestedSecurityToken><saml:Assertion MajorVersion="1" MinorVersion="1" AssertionID="_57806901-e325-431f-827b-28dc3f81f007" Issuer="http://fs.ajmichael.net/adfs/services/trust" IssueInstant="2015-07-31T18:52:50.806Z" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"><saml:Conditions NotBefore="2015-07-31T18:52:50.806Z" NotOnOrAfter="2015-07-31T19:52:50.806Z"><saml:AudienceRestrictionCondition><saml:Audience>urn:federation:MicrosoftOnline</saml:Audience></saml:AudienceRestrictionCondition></saml:Conditions><saml:AttributeStatement><saml:Subject><saml:NameIdentifier Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">vtgQONppjEaJq77vvbpJWA==</saml:NameIdentifier><saml:SubjectConfirmation><saml:ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:bearer</saml:ConfirmationMethod></saml:SubjectConfirmation></saml:Subject><saml:Attribute AttributeName="UPN" AttributeNamespace="http://schemas.xmlsoap.org/claims"><saml:AttributeValue>aaron@ajmichael.net</saml:AttributeValue></saml:Attribute><saml:Attribute AttributeName="ImmutableID" AttributeNamespace="http://schemas.microsoft.com/LiveID/Federation/2008/05"><saml:AttributeValue>vtgQONppjEaJq77vvbpJWA==</saml:AttributeValue></saml:Attribute></saml:AttributeStatement><saml:AuthenticationStatement AuthenticationMethod="urn:oasis:names:tc:SAML:1.0:am:password" AuthenticationInstant="2015-07-31T18:52:50.806Z"><saml:Subject><saml:NameIdentifier Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">vtgQONppjEaJq77vvbpJWA==</saml:NameIdentifier><saml:SubjectConfirmation><saml:ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:bearer</saml:ConfirmationMethod></saml:SubjectConfirmation></saml:Subject></saml:AuthenticationStatement><ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:SignedInfo><ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/><ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/><ds:Reference URI="#_57806901-e325-431f-827b-28dc3f81f007"><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><ds:DigestValue>oF5D0U4UJToa/rNQgaddWjBzEJ0=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>PpNWCDILvv9BX5yAkJDCwIEr6AHh9ltAPyp8nvHuiIaanyAgLi755MNylLBWm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sVBzX3hzur741IYQclz9eEJtSrPNG04/zqq2/9LP81reIEksfKhgPho33PYop3cSorO8ogbxm10/bFgi99Lz1tTJkxpGhjxOdrMrZ5gU2r9NfyeL6Z9hmiixHQXruQdQSTeUsOVnx97mLO9fjKbeeeGrI5x8xsVWYDqRlhfXamwaglXu8ptf7frY/+FLoVKSAlGSV+GMw2Q53s4h91o4hPsNxanZD474n2soP3MKqeIyqVtafboooZ85PGh2kvg==</X509Certificate></X509Data></KeyInfo></ds:Signature></saml:Assertion></trust:RequestedSecurityToken><trust:RequestedAttachedReference><o:SecurityTokenReference k:TokenType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:k="http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd"><o:KeyIdentifier ValueType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.0#SAMLAssertionID">_57806901-e325-431f-827b-28dc3f81f007</o:KeyIdentifier></o:SecurityTokenReference></trust:RequestedAttachedReference><trust:RequestedUnattachedReference><o:SecurityTokenReference k:TokenType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:k="http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd"><o:KeyIdentifier ValueType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.0#SAMLAssertionID">_57806901-e325-431f-827b-28dc3f81f007</o:KeyIdentifier></o:SecurityTokenReference></trust:RequestedUnattachedReference><trust:TokenType>urn:oasis:names:tc:SAML:1.0:assertion</trust:TokenType><trust:RequestType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/Issue</trust:RequestType><trust:KeyType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/Bearer</trust:KeyType></trust:RequestSecurityTokenResponse></trust:RequestSecurityTokenResponseCollection></s:Body></s:Envelope>
@@ -0,0 +1,89 @@
1
+ <?xml version="1.0"?>
2
+ <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
3
+ <s:Header>
4
+ <a:Action s:mustUnderstand="1">http://schemas.xmlsoap.org/ws/2005/02/trust/RSTR/Issue</a:Action>
5
+ <o:Security xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" s:mustUnderstand="1">
6
+ <u:Timestamp u:Id="_0">
7
+ <u:Created>2015-07-30T21:08:29.919Z</u:Created>
8
+ <u:Expires>2015-07-30T21:13:29.919Z</u:Expires>
9
+ </u:Timestamp>
10
+ </o:Security>
11
+ </s:Header>
12
+ <s:Body>
13
+ <t:RequestSecurityTokenResponse xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust">
14
+ <t:Lifetime>
15
+ <wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2015-07-30T21:08:29.919Z</wsu:Created>
16
+ <wsu:Expires xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2015-07-30T22:08:29.919Z</wsu:Expires>
17
+ </t:Lifetime>
18
+ <wsp:AppliesTo xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
19
+ <wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
20
+ <wsa:Address>urn:federation:MicrosoftOnline</wsa:Address>
21
+ </wsa:EndpointReference>
22
+ </wsp:AppliesTo>
23
+ <t:RequestedSecurityToken>
24
+ <saml:Assertion xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" MajorVersion="1" MinorVersion="1" AssertionID="_ba16587e-5f6c-4c2f-bad6-20767143844f" Issuer="http://fs.ajmichael.net/adfs/services/trust" IssueInstant="2015-07-30T21:08:29.919Z">
25
+ <saml:Conditions NotBefore="2015-07-30T21:08:29.919Z" NotOnOrAfter="2015-07-30T22:08:29.919Z">
26
+ <saml:AudienceRestrictionCondition>
27
+ <saml:Audience>urn:federation:MicrosoftOnline</saml:Audience>
28
+ </saml:AudienceRestrictionCondition>
29
+ </saml:Conditions>
30
+ <saml:AttributeStatement>
31
+ <saml:Subject>
32
+ <saml:NameIdentifier Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">vtgQONppjEaJq77vvbpJWA==</saml:NameIdentifier>
33
+ <saml:SubjectConfirmation>
34
+ <saml:ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:bearer</saml:ConfirmationMethod>
35
+ </saml:SubjectConfirmation>
36
+ </saml:Subject>
37
+ <saml:Attribute AttributeName="UPN" AttributeNamespace="http://schemas.xmlsoap.org/claims">
38
+ <saml:AttributeValue>aaron@ajmichael.net</saml:AttributeValue>
39
+ </saml:Attribute>
40
+ <saml:Attribute AttributeName="ImmutableID" AttributeNamespace="http://schemas.microsoft.com/LiveID/Federation/2008/05">
41
+ <saml:AttributeValue>vtgQONppjEaJq77vvbpJWA==</saml:AttributeValue>
42
+ </saml:Attribute>
43
+ </saml:AttributeStatement>
44
+ <saml:AuthenticationStatement AuthenticationMethod="urn:oasis:names:tc:SAML:1.0:am:password" AuthenticationInstant="2015-07-30T21:08:29.919Z">
45
+ <saml:Subject>
46
+ <saml:NameIdentifier Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">vtgQONppjEaJq77vvbpJWA==</saml:NameIdentifier>
47
+ <saml:SubjectConfirmation>
48
+ <saml:ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:bearer</saml:ConfirmationMethod>
49
+ </saml:SubjectConfirmation>
50
+ </saml:Subject>
51
+ </saml:AuthenticationStatement>
52
+ <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
53
+ <ds:SignedInfo>
54
+ <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
55
+ <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
56
+ <ds:Reference URI="#_ba16587e-5f6c-4c2f-bad6-20767143844f">
57
+ <ds:Transforms>
58
+ <ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
59
+ <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
60
+ </ds:Transforms>
61
+ <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
62
+ <ds:DigestValue>r4VorpYHSk5ZElNt9BzrIwuwwV4=</ds:DigestValue>
63
+ </ds:Reference>
64
+ </ds:SignedInfo>
65
+ <ds:SignatureValue>cNSoYTNmp7N2vtTNb9VNkhTgvF/aF0hNWzGkw1+7oy5CIxWYu4sDauY1S42TNRZjsd/m7DL5IDG02YdLe2PfUMNiA6k1nxMcP7C2ql2Wrp2cwTRFTmDEHO9TcSaKbX8owvQGmn492qOQ9ziwUgBleomM2aKsp+jtO+AHi4VObOmuxBcahAB5Krw0DLsWxfM1pAYZygaQfnf+QM6k1BwIIIRutPLIRvn0XeBjLynB5JAHc6W7j8ii2rOCKgOVp5b4pnKsm4Y9gcv0jQQILwSVYWxN6p+LkhKCxmXBhiug+VfoH9BsilItfXSoEial4cBP7EC5J9Nxn1twj2HeKohSig==</ds:SignatureValue>
66
+ <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
67
+ <X509Data>
68
+ <X509Certificate>MIIC3DCCAcSgAwIBAgIQZK0UpOPhlpxBNKzZ8XOwRzANBgkqhkiG9w0BAQsFADAqMSgwJgYDVQQDEx9BREZTIFNpZ25pbmcgLSBmcy5ham1pY2hhZWwubmV0MB4XDTE1MDcwMjIxMzYyOVoXDTE2MDcwMTIxMzYyOVowKjEoMCYGA1UEAxMfQURGUyBTaWduaW5nIC0gZnMuYWptaWNoYWVsLm5ldDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMyCCmkytGlVsg8H2zUo3zZ8p/2tuq/f1QOw9h9rh3EKaJrX4+Hk60rzjNiwmSfnpqcYDS7MPKTX2UdngV6HZsnEQD5S2vaNTncGIkyvAi6jAUo9fYfuSIZxQyoP6wFqTMYHrHJhjZEuExPNAKEFmR0oozSzCFOZH0oJCr1b1jwb5Fi7M1uN98DPbRQg0CbTdV2EJzj2cnMX7v1aohwUg8rUo3yvexLuvcJSXy4kRWCNRTtVOo57NeE2pECdlCZQOMCnpps7AfaEUkLQL8Jbi8lJyNZ65I19+wKYSb1mx60c2rotgkQIN6v5/WgnXdA3Dok9gbjlqoK9Ew3rzAmr4q8CAwEAATANBgkqhkiG9w0BAQsFAAOCAQEACsiXJk+V+rBOJJkaVss8qDqysT2H6PcV6vjWs+fk84edYqhpNz9wimLOa/afQSVgcfMAbs6/CG3STmGRvQ+wDhYsVBzX3hzur741IYQclz9eEJtSrPNG04/zqq2/9LP81reIEksfKhgPho33PYop3cSorO8ogbxm10/bFgi99Lz1tTJkxpGhjxOdrMrZ5gU2r9NfyeL6Z9hmiixHQXruQdQSTeUsOVnx97mLO9fjKbeeeGrI5x8xsVWYDqRlhfXamwaglXu8ptf7frY/+FLoVKSAlGSV+GMw2Q53s4h91o4hPsNxanZD474n2soP3MKqeIyqVtafboooZ85PGh2kvg==</X509Certificate>
69
+ </X509Data>
70
+ </KeyInfo>
71
+ </ds:Signature>
72
+ </saml:Assertion>
73
+ </t:RequestedSecurityToken>
74
+ <t:RequestedAttachedReference>
75
+ <o:SecurityTokenReference xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:k="http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd" k:TokenType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1">
76
+ <o:KeyIdentifier ValueType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.0#SAMLAssertionID">_ba16587e-5f6c-4c2f-bad6-20767143844f</o:KeyIdentifier>
77
+ </o:SecurityTokenReference>
78
+ </t:RequestedAttachedReference>
79
+ <t:RequestedUnattachedReference>
80
+ <o:SecurityTokenReference xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:k="http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd" k:TokenType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1">
81
+ <o:KeyIdentifier ValueType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.0#SAMLAssertionID">_ba16587e-5f6c-4c2f-bad6-20767143844f</o:KeyIdentifier>
82
+ </o:SecurityTokenReference>
83
+ </t:RequestedUnattachedReference>
84
+ <t:TokenType>urn:oasis:names:tc:SAML:1.0:assertion</t:TokenType>
85
+ <t:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue</t:RequestType>
86
+ <t:KeyType>http://schemas.xmlsoap.org/ws/2005/05/identity/NoProofKey</t:KeyType>
87
+ </t:RequestSecurityTokenResponse>
88
+ </s:Body>
89
+ </s:Envelope>
@@ -0,0 +1,53 @@
1
+ #-------------------------------------------------------------------------------
2
+ # Copyright (c) 2015 Micorosft Corporation
3
+ #
4
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ # of this software and associated documentation files (the "Software"), to deal
6
+ # in the Software without restriction, including without limitation the rights
7
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ # copies of the Software, and to permit persons to whom the Software is
9
+ # furnished to do so, subject to the following conditions:
10
+ #
11
+ # The above copyright notice and this permission notice shall be included in
12
+ # all copies or substantial portions of the Software.
13
+ #
14
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
+ # THE SOFTWARE.
21
+ #-------------------------------------------------------------------------------
22
+
23
+ require_relative './support/fake_token_endpoint'
24
+
25
+ require 'simplecov'
26
+ require 'webmock/rspec'
27
+
28
+ # The coverage tool only considers code after this line.
29
+ SimpleCov.start do
30
+ add_filter 'spec' # ignore spec files
31
+ end
32
+
33
+ require 'adal'
34
+
35
+ # Don't print any logs from ADAL::Logger.
36
+ ADAL::Logging.log_output = File.open(File::NULL, 'w')
37
+
38
+ # Unit tests do not need network access. Any attempts to access the network
39
+ # will throw exceptions.
40
+ WebMock.disable_net_connect!(allow_localhost: true)
41
+
42
+ RSpec.configure do |config|
43
+ config.before(:each) do
44
+ # Any network requests matching these RegExps will be redirected to the mock
45
+ # Sinatra servers in $DIR/spec/support. Any network requests that don't
46
+ # match will attempt to access the network and raise exceptions.
47
+ stub_request(:post, %r{oauth2/token}).to_rack(FakeTokenEndpoint)
48
+ end
49
+
50
+ config.expect_with :rspec do |c|
51
+ c.syntax = :expect
52
+ end
53
+ end
@@ -0,0 +1,40 @@
1
+ #-------------------------------------------------------------------------------
2
+ # Copyright (c) 2015 Micorosft Corporation
3
+ #
4
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ # of this software and associated documentation files (the "Software"), to deal
6
+ # in the Software without restriction, including without limitation the rights
7
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ # copies of the Software, and to permit persons to whom the Software is
9
+ # furnished to do so, subject to the following conditions:
10
+ #
11
+ # The above copyright notice and this permission notice shall be included in
12
+ # all copies or substantial portions of the Software.
13
+ #
14
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
+ # THE SOFTWARE.
21
+ #-------------------------------------------------------------------------------
22
+
23
+ # All of the data that the fake token and authority endpoints support. It is
24
+ # separated into its own module so that it can be used as a mix-in in test
25
+ # classes.
26
+ module FakeData
27
+ AUTH_CODE = 'auth_code_1'
28
+ AUTHORITY = 'login.windows.net'
29
+ ASSERTION = 'header.payload.crypto'
30
+ CLIENT_ID = 'client_id_1'
31
+ CLIENT_SECRET = 'client_secret_1'
32
+ PASSWORD = 'password1'
33
+ REDIRECT_URI = 'http://redirect1.com'
34
+ REFRESH_TOKEN = 'refresh_token_1'
35
+ RETURNED_TOKEN = 'a new token'
36
+ RESOURCE = 'resource'
37
+ TENANT = 'TENANT1'
38
+ USERNAME = 'user1@TENANT1'
39
+ USER_ASSERTION = 'user_assertion_1'
40
+ end