01: /*
02: * Copyright 2005 - 2007 The Kuali Foundation.
03: *
04: *
05: * Licensed under the Educational Community License, Version 1.0 (the "License");
06: * you may not use this file except in compliance with the License.
07: * You may obtain a copy of the License at
08: *
09: * http://www.opensource.org/licenses/ecl1.php
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: package org.kuali.rice.security.credentials;
18:
19: /**
20: * Inteface for abstracting out how we obtain credentials to access secure
21: * applications across the bus.
22: *
23: * @author Kuali Rice Team (kuali-rice@googlegroups.com)
24: * @version $Revision: 1.2.24.1 $ $Date: 2007/10/17 20:32:06 $
25: * @since 0.9
26: */
27: public interface CredentialsSource {
28:
29: /**
30: * Defines the types of Credentials that the system is willing to accept.
31: * These should coincide with what Acegi is willing to accept.
32: */
33: public static enum CredentialsType {
34: CAS, USERNAME_PASSWORD, JAAS, X509
35: }
36:
37: /**
38: * Returns the supported CredentialsType. This should never be null.
39: *
40: * @return the supported credentials type.
41: */
42: CredentialsType getSupportedCredentialsType();
43:
44: /**
45: * Returns the SecurityContext which should have the proper credentials to
46: * give to any system requiring credentials. This class has no guarantees
47: * what a user will do with the credentials and should thus always return a
48: * thread-safe version.
49: *
50: * @param serviceDefinition The Service Definition for which we want
51: * credentials for.
52: * @return the credentials, or null if credentials could not be obtained.
53: */
54: Credentials getCredentials(String serviceEndpoint);
55: }
|