001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017:
018: package org.apache.jetspeed.sso;
019:
020: import java.util.Collection;
021: import org.apache.jetspeed.sso.SSOPrincipal;
022:
023: /**
024: * Interface SSOSite
025: *
026: * @author rruttimann
027: *
028: */
029: public interface SSOSite {
030: /**
031: * @return Returns the isAllowUserSet.
032: */
033: public boolean isAllowUserSet();
034:
035: /**
036: * @param isAllowUserSet The isAllowUserSet to set.
037: */
038: public void setAllowUserSet(boolean isAllowUserSet);
039:
040: /**
041: * @return Returns the isCertificateRequired.
042: */
043: public boolean isCertificateRequired();
044:
045: /**
046: * @param isCertificateRequired The isCertificateRequired to set.
047: */
048: public void setCertificateRequired(boolean isCertificateRequired);
049:
050: /**
051: * @return Returns the name.
052: */
053: public String getName();
054:
055: /**
056: * @param name The name to set.
057: */
058: public void setName(String name);
059:
060: /**
061: * @return Returns the principals.
062: */
063: public Collection getPrincipals();
064:
065: /**
066: * @param principals The principals to set.
067: */
068: public void setPrincipals(Collection principals);
069:
070: /**
071: * @return Returns the siteId.
072: */
073: public int getSiteId();
074:
075: /**
076: * @param siteId The siteId to set.
077: */
078: public void setSiteId(int siteId);
079:
080: /**
081: * @return Returns the siteURL.
082: */
083: public String getSiteURL();
084:
085: /**
086: * @param siteURL The siteURL to set.
087: */
088: public void setSiteURL(String siteURL);
089:
090: /**
091: * Adds the SSOPrincipal to the principals collection
092: *
093: */
094: public void addPrincipal(SSOPrincipal principal)
095: throws SSOException;
096:
097: /**
098: * removePrincipal()
099: * removes a principal from the principals collection
100: *
101: */
102: public void removePrincipal(long principalId) throws SSOException;
103:
104: /**
105: * getRemotePrincipals
106: */
107: public Collection getRemotePrincipals();
108:
109: /**
110: * setRemotePrincipals
111: */
112: public void setRemotePrincipals(Collection remotePrincipals);
113:
114: /**
115: * Define the Authentication methods.
116: * Supported are: Challenge Response and From based
117: */
118: public void setFormAuthentication(boolean isFormAuthentication);
119:
120: /**
121: * Form authentication requires two fields that hold the credential
122: * information for the request.
123: */
124:
125: public void configFormAuthentication(String formUserField,
126: String formPwdField);
127:
128: /*
129: * Uses Challenge Response mechanism for authentication
130: */
131: public void setChallengeResponseAuthentication(
132: boolean isChallengeResponseAuthentication);
133:
134: public boolean isChallangeResponseAuthentication();
135:
136: public boolean isFormAuthentication();
137:
138: public String getFormPwdField();
139:
140: public void setFormPwdField(String formPwdField);
141:
142: public String getFormUserField();
143:
144: public void setFormUserField(String formUserField);
145:
146: public void setRealm(String realm);
147:
148: public String getRealm();
149: }
|