01: /* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
02: *
03: * Licensed under the Apache License, Version 2.0 (the "License");
04: * you may not use this file except in compliance with the License.
05: * You may obtain a copy of the License at
06: *
07: * http://www.apache.org/licenses/LICENSE-2.0
08: *
09: * Unless required by applicable law or agreed to in writing, software
10: * distributed under the License is distributed on an "AS IS" BASIS,
11: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12: * See the License for the specific language governing permissions and
13: * limitations under the License.
14: */
15:
16: package org.acegisecurity.providers.rcp;
17:
18: import org.acegisecurity.GrantedAuthority;
19:
20: /**
21: * Allows remote clients to attempt authentication.
22: *
23: * @author Ben Alex
24: * @version $Id: RemoteAuthenticationManager.java 1784 2007-02-24 21:00:24Z luke_t $
25: */
26: public interface RemoteAuthenticationManager {
27: //~ Methods ========================================================================================================
28:
29: /**
30: * Attempts to authenticate the remote client using the presented username and password. If authentication
31: * is successful, an array of <code>GrantedAuthority[]</code> objects will be returned.<p>In order to
32: * maximise remoting protocol compatibility, a design decision was taken to operate with minimal arguments and
33: * return only the minimal amount of information required for remote clients to enable/disable relevant user
34: * interface commands etc. There is nothing preventing users from implementing their own equivalent package that
35: * works with more complex object types.</p>
36: *
37: * @param username the username the remote client wishes to authenticate with.
38: * @param password the password the remote client wishes to authenticate with.
39: *
40: * @return all of the granted authorities the specified username and password have access to.
41: *
42: * @throws RemoteAuthenticationException if the authentication failed.
43: */
44: GrantedAuthority[] attemptAuthentication(String username,
45: String password) throws RemoteAuthenticationException;
46: }
|