|
1 |
| |
|
2 |
| |
|
3 |
| |
|
4 |
| |
|
5 |
| |
|
6 |
| |
|
7 |
| |
|
8 |
| |
|
9 |
| |
|
10 |
| |
|
11 |
| package org.globus.cas.impl.client; |
|
12 |
| |
|
13 |
| import org.globus.wsrf.impl.security.authentication.Constants; |
|
14 |
| |
|
15 |
| |
|
16 |
| |
|
17 |
| |
|
18 |
| |
|
19 |
| public class ClientParams { |
|
20 |
| |
|
21 |
| private int assertionLifetime = 24 * 60 * 60; |
|
22 |
| private String proxyFilename = null; |
|
23 |
| private String casProxyFilename = null; |
|
24 |
| private String casProxyTag = null; |
|
25 |
| private ResourceActionsMap[] resActions = null; |
|
26 |
| private String securityType = Constants.GSI_SEC_MSG; |
|
27 |
| private Object protectionType = Constants.SIGNATURE; |
|
28 |
| |
|
29 |
| |
|
30 |
| |
|
31 |
| |
|
32 |
| |
|
33 |
0
| public ClientParams() {
|
|
34 |
| } |
|
35 |
| |
|
36 |
| |
|
37 |
| |
|
38 |
| |
|
39 |
| |
|
40 |
0
| public void setAssertionLifetime(int assertionLifetime) {
|
|
41 |
0
| this.assertionLifetime = assertionLifetime;
|
|
42 |
| } |
|
43 |
| |
|
44 |
| |
|
45 |
| |
|
46 |
| |
|
47 |
| |
|
48 |
0
| public void setProxyFileName(String proxyFilename) {
|
|
49 |
0
| this.proxyFilename = proxyFilename;
|
|
50 |
| } |
|
51 |
| |
|
52 |
| |
|
53 |
| |
|
54 |
| |
|
55 |
| |
|
56 |
0
| public void setCasProxyFileName(String casProxyFilename) {
|
|
57 |
0
| this.casProxyFilename = casProxyFilename;
|
|
58 |
| } |
|
59 |
| |
|
60 |
| |
|
61 |
| |
|
62 |
| |
|
63 |
| |
|
64 |
0
| public void setResourceActionsMap(ResourceActionsMap[] resActions) {
|
|
65 |
0
| this.resActions = resActions;
|
|
66 |
| } |
|
67 |
| |
|
68 |
| |
|
69 |
| |
|
70 |
| |
|
71 |
| |
|
72 |
| |
|
73 |
| |
|
74 |
0
| public void setCasProxyTag(String tag) {
|
|
75 |
0
| this.casProxyTag = tag;
|
|
76 |
| } |
|
77 |
| |
|
78 |
0
| public void setSecurityType(String secType) {
|
|
79 |
0
| this.securityType = secType;
|
|
80 |
| } |
|
81 |
| |
|
82 |
0
| public void setProtectionType(Object protType) {
|
|
83 |
0
| if (protType != null) {
|
|
84 |
0
| this.protectionType = protType;
|
|
85 |
| } |
|
86 |
| } |
|
87 |
| |
|
88 |
0
| public String getSecurityType() {
|
|
89 |
0
| return this.securityType;
|
|
90 |
| } |
|
91 |
| |
|
92 |
0
| public Object getProtectionType() {
|
|
93 |
0
| return this.protectionType;
|
|
94 |
| } |
|
95 |
| |
|
96 |
0
| public int getAssertionLifetime() {
|
|
97 |
0
| return this.assertionLifetime;
|
|
98 |
| } |
|
99 |
| |
|
100 |
0
| public String getProxyFileName() {
|
|
101 |
0
| return this.proxyFilename;
|
|
102 |
| } |
|
103 |
| |
|
104 |
0
| public String getCasProxyTag() {
|
|
105 |
0
| return this.casProxyTag;
|
|
106 |
| } |
|
107 |
| |
|
108 |
0
| public String getCasProxyFileName() {
|
|
109 |
0
| return this.casProxyFilename;
|
|
110 |
| } |
|
111 |
| |
|
112 |
0
| public ResourceActionsMap[] getResourceActionsMap() {
|
|
113 |
0
| return this.resActions;
|
|
114 |
| } |
|
115 |
| |
|
116 |
0
| public String toString() {
|
|
117 |
0
| String returnString;
|
|
118 |
0
| if (this.proxyFilename == null)
|
|
119 |
0
| returnString = "Proxy file name not set \n";
|
|
120 |
| else |
|
121 |
0
| returnString = "Proxy file name is " + this.proxyFilename + "\n";
|
|
122 |
| |
|
123 |
0
| if (this.casProxyFilename == null)
|
|
124 |
0
| returnString = returnString + "CAS Proxy file name not set \n";
|
|
125 |
| else |
|
126 |
0
| returnString = returnString + "CAS Proxy file name is "
|
|
127 |
| + this.casProxyFilename + "\n"; |
|
128 |
| |
|
129 |
0
| returnString = returnString + "Requested assertion life time is " +
|
|
130 |
| this.assertionLifetime + "\n"; |
|
131 |
| |
|
132 |
0
| returnString = returnString + "Cas proxy tag is " + this.casProxyTag
|
|
133 |
| + "\n"; |
|
134 |
| |
|
135 |
0
| returnString = returnString + "Security type " + this.securityType
|
|
136 |
| + "Protection type " + this.protectionType; |
|
137 |
| |
|
138 |
0
| if (this.resActions != null) {
|
|
139 |
0
| returnString = returnString + "Resource/Actions: \n";
|
|
140 |
0
| for (int i=0; i<resActions.length; i++) {
|
|
141 |
0
| returnString = returnString + resActions[i].toString();
|
|
142 |
| } |
|
143 |
| } |
|
144 |
0
| return returnString;
|
|
145 |
| } |
|
146 |
| } |
|
147 |
| |