|
|||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| RemoteAuthenticationManager.java | - | - | - | - |
|
||||||||||||||
| 1 | /* Copyright 2004 Acegi Technology Pty Limited | |
| 2 | * | |
| 3 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
| 4 | * you may not use this file except in compliance with the License. | |
| 5 | * You may obtain a copy of the License at | |
| 6 | * | |
| 7 | * http://www.apache.org/licenses/LICENSE-2.0 | |
| 8 | * | |
| 9 | * 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 | /** | |
| 22 | * Allows remote clients to attempt authentication. | |
| 23 | * | |
| 24 | * @author Ben Alex | |
| 25 | * @version $Id: RemoteAuthenticationManager.java,v 1.2 2005/11/17 00:55:51 benalex Exp $ | |
| 26 | */ | |
| 27 | public interface RemoteAuthenticationManager { | |
| 28 | //~ Methods ================================================================ | |
| 29 | ||
| 30 | /** | |
| 31 | * Attempts to authenticate the remote client using the presented username | |
| 32 | * and password. If authentication is successful, an array of | |
| 33 | * <code>GrantedAuthority[]</code> objects will be returned. | |
| 34 | * | |
| 35 | * <P> | |
| 36 | * In order to maximise remoting protocol compatibility, a design decision | |
| 37 | * was taken to operate with minimal arguments and return only the minimal | |
| 38 | * amount information required for remote clients to enable/disable | |
| 39 | * relevant user interface commands etc. There is nothing preventing users | |
| 40 | * from implementing their own equivalent package that works with more | |
| 41 | * complex object types. | |
| 42 | * </p> | |
| 43 | * | |
| 44 | * @param username the username the remote client wishes to authenticate | |
| 45 | * with | |
| 46 | * @param password the password the remote client wishes to authenticate | |
| 47 | * wish | |
| 48 | * | |
| 49 | * @return all of the granted authorities the specified username and | |
| 50 | * password have access to | |
| 51 | * | |
| 52 | * @throws RemoteAuthenticationException if the authentication failed | |
| 53 | */ | |
| 54 | public GrantedAuthority[] attemptAuthentication(String username, | |
| 55 | String password) throws RemoteAuthenticationException; | |
| 56 | } |
|
||||||||||