View Javadoc

1   /* 
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8   *
9   *     http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17  
18  package org.apache.jetspeed.sso;
19  
20  import java.util.Collection;
21  import org.apache.jetspeed.sso.SSOPrincipal;
22  
23  /***
24   * Interface SSOSite
25   * 
26   * @author rruttimann
27   *
28   */
29  public interface SSOSite {	
30  	/***
31  	 * @return Returns the isAllowUserSet.
32  	 */
33  	public boolean isAllowUserSet() ;
34  	
35  	/***
36  	 * @param isAllowUserSet The isAllowUserSet to set.
37  	 */
38  	public void setAllowUserSet(boolean isAllowUserSet);
39  	
40  	/***
41  	 * @return Returns the isCertificateRequired.
42  	 */
43  	public boolean isCertificateRequired();
44  	
45  	/***
46  	 * @param isCertificateRequired The isCertificateRequired to set.
47  	 */
48  	public void setCertificateRequired(boolean isCertificateRequired);
49  	
50  	/***
51  	 * @return Returns the name.
52  	 */
53  	public String getName() ;
54  	
55  	/***
56  	 * @param name The name to set.
57  	 */
58  	public void setName(String name) ;
59  	
60  	/***
61  	 * @return Returns the principals.
62  	 */
63  	public Collection getPrincipals() ;
64  	
65  	/***
66  	 * @param principals The principals to set.
67  	 */
68  	public void setPrincipals(Collection principals);
69  	
70  	/***
71  	 * @return Returns the siteId.
72  	 */
73  	public int getSiteId() ;
74  	
75  	/***
76  	 * @param siteId The siteId to set.
77  	 */
78  	public void setSiteId(int siteId) ;
79  	
80  	/***
81  	 * @return Returns the siteURL.
82  	 */
83  	public String getSiteURL() ;
84  	
85  	/***
86  	 * @param siteURL The siteURL to set.
87  	 */
88  	public void setSiteURL(String siteURL) ;
89  	
90  	
91  	
92  	/***
93  	 * Adds the SSOPrincipal to the principals collection
94  	 *
95  	 */
96  	public void addPrincipal(SSOPrincipal principal) throws SSOException;
97  	
98  	/***
99  	* removePrincipal()
100 	 * removes a principal from the principals collection
101 	 *
102 	 */
103 	public void removePrincipal(long principalId) throws SSOException;
104 	
105 	 /***
106      * getRemotePrincipals 
107      */
108 	public Collection getRemotePrincipals();
109 	
110     /***
111      * setRemotePrincipals 
112      */
113     public void setRemotePrincipals(Collection remotePrincipals);
114     
115     /***
116      * Define the Authentication methods. 
117      * Supported are: Challenge Response and From based
118      */
119     public void setFormAuthentication(boolean isFormAuthentication);
120    
121     /***
122      * Form authentication requires two fields that hold the credential 
123      * information for the request.
124      */
125    
126     public void configFormAuthentication(String formUserField, String formPwdField);
127     
128     /*
129      * Uses Challenge Response mechanism for authentication
130      */
131     public void setChallengeResponseAuthentication(boolean isChallengeResponseAuthentication);
132     
133     public boolean isChallangeResponseAuthentication();
134 	public boolean isFormAuthentication();
135 
136 	public String getFormPwdField();
137 	public void setFormPwdField(String formPwdField);
138 
139 	public String getFormUserField();
140 	public void setFormUserField(String formUserField);
141 	
142 	public void setRealm(String realm);
143 	public String getRealm();
144 }