2 // FederatedMessageSecurityOverHttp.cs
5 // Atsushi Enomoto <atsushi@ximian.com>
7 // Copyright (C) 2006 Novell, Inc. http://www.novell.com
9 // Permission is hereby granted, free of charge, to any person obtaining
10 // a copy of this software and associated documentation files (the
11 // "Software"), to deal in the Software without restriction, including
12 // without limitation the rights to use, copy, modify, merge, publish,
13 // distribute, sublicense, and/or sell copies of the Software, and to
14 // permit persons to whom the Software is furnished to do so, subject to
15 // the following conditions:
17 // The above copyright notice and this permission notice shall be
18 // included in all copies or substantial portions of the Software.
20 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 using System.Collections.ObjectModel;
30 using System.Net.Security;
31 using System.IdentityModel.Tokens;
32 using System.ServiceModel.Channels;
33 using System.ServiceModel.Security;
34 using System.ServiceModel.Security.Tokens;
38 namespace System.ServiceModel
41 public sealed class FederatedMessageSecurityOverHttp
43 SecurityAlgorithmSuite algorithm =
44 SecurityAlgorithmSuite.Default;
45 SecurityKeyType issued_key_type;
46 string issued_token_type;
47 EndpointAddress issuer_address, metadata_address;
48 Binding issuer_binding;
49 bool establish_sec_ctx = true, negotiate = true;
50 Collection<ClaimTypeRequirement> claim_type_reqs =
51 new Collection<ClaimTypeRequirement> ();
52 Collection<XmlElement> request_params = new Collection<XmlElement> ();
54 internal FederatedMessageSecurityOverHttp ()
58 public SecurityAlgorithmSuite AlgorithmSuite {
59 get { return algorithm; }
60 set { algorithm = value; }
63 public bool EstablishSecurityContext {
64 get { return establish_sec_ctx; }
65 set { establish_sec_ctx = value; }
68 public SecurityKeyType IssuedKeyType {
69 get { return issued_key_type; }
70 set { issued_key_type = value; }
73 public string IssuedTokenType {
74 get { return issued_token_type; }
75 set { issued_token_type = value; }
78 public EndpointAddress IssuerAddress {
79 get { return issuer_address; }
80 set { issuer_address = value; }
83 public Binding IssuerBinding {
84 get { return issuer_binding; }
85 set { issuer_binding = value; }
88 public EndpointAddress IssuerMetadataAddress {
89 get { return metadata_address; }
90 set { metadata_address = value; }
93 public bool NegotiateServiceCredential {
94 get { return negotiate; }
95 set { negotiate = value; }
98 public Collection<ClaimTypeRequirement> ClaimTypeRequirements {
99 get { return claim_type_reqs; }
102 public Collection<XmlElement> TokenRequestParameters {
103 get { return request_params; }