Merge pull request #205 from m3rlinez/master
[mono.git] / mcs / class / System.ServiceModel / System.ServiceModel / FederatedMessageSecurityOverHttp.cs
1 //
2 // FederatedMessageSecurityOverHttp.cs
3 //
4 // Author:
5 //      Atsushi Enomoto <atsushi@ximian.com>
6 //
7 // Copyright (C) 2006 Novell, Inc.  http://www.novell.com
8 //
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:
16 // 
17 // The above copyright notice and this permission notice shall be
18 // included in all copies or substantial portions of the Software.
19 // 
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.
27 //
28 using System;
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;
35 using System.Text;
36 using System.Xml;
37
38 namespace System.ServiceModel
39 {
40         [MonoTODO]
41         public sealed class FederatedMessageSecurityOverHttp
42         {
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> ();
53
54                 internal FederatedMessageSecurityOverHttp ()
55                 {
56                 }
57
58                 public SecurityAlgorithmSuite AlgorithmSuite {
59                         get { return algorithm; }
60                         set { algorithm = value; }
61                 }
62
63                 public bool EstablishSecurityContext {
64                         get { return establish_sec_ctx; }
65                         set { establish_sec_ctx = value; }
66                 }
67
68                 public SecurityKeyType IssuedKeyType {
69                         get { return issued_key_type; }
70                         set { issued_key_type = value; }
71                 }
72
73                 public string IssuedTokenType {
74                         get { return issued_token_type; }
75                         set { issued_token_type = value; }
76                 }
77
78                 public EndpointAddress IssuerAddress {
79                         get { return issuer_address; }
80                         set { issuer_address = value; }
81                 }
82
83                 public Binding IssuerBinding {
84                         get { return issuer_binding; }
85                         set { issuer_binding = value; }
86                 }
87
88                 public EndpointAddress IssuerMetadataAddress {
89                         get { return metadata_address; }
90                         set { metadata_address = value; }
91                 }
92
93                 public bool NegotiateServiceCredential {
94                         get { return negotiate; }
95                         set { negotiate = value; }
96                 }
97
98                 public Collection<ClaimTypeRequirement> ClaimTypeRequirements {
99                         get { return claim_type_reqs; }
100                 }
101
102                 public Collection<XmlElement> TokenRequestParameters {
103                         get { return request_params; }
104                 }
105         }
106 }