View Javadoc

1   /*
2    * <cvs:source>$Source: /devel/astrogrid/community/common/src/java/org/astrogrid/community/common/security/service/SecurityService.java,v $</cvs:source>
3    * <cvs:author>$Author: dave $</cvs:author>
4    * <cvs:date>$Date: 2004/06/18 13:45:20 $</cvs:date>
5    * <cvs:version>$Revision: 1.6 $</cvs:version>
6    *
7    * <cvs:log>
8    *   $Log: SecurityService.java,v $
9    *   Revision 1.6  2004/06/18 13:45:20  dave
10   *   Merged development branch, dave-dev-200406081614, into HEAD
11   *
12   *   Revision 1.5.36.1  2004/06/17 13:38:59  dave
13   *   Tidied up old CVS log entries
14   *
15   * </cvs:log>
16   *
17   */
18  package org.astrogrid.community.common.security.service ;
19  
20  import java.rmi.Remote ;
21  import java.rmi.RemoteException ;
22  
23  import org.astrogrid.community.common.security.data.SecurityToken ;
24  
25  import org.astrogrid.community.common.service.CommunityService ;
26  
27  import org.astrogrid.community.common.exception.CommunityServiceException  ;
28  import org.astrogrid.community.common.exception.CommunitySecurityException ;
29  import org.astrogrid.community.common.exception.CommunityIdentifierException  ;
30  
31  /***
32   * Public interface for our SecurityService.
33   *
34   */
35  public interface SecurityService
36      extends Remote, CommunityService
37      {
38  
39      /***
40       * Check an Account password.
41       * @param account  The account ident.
42       * @param password The account password.
43       * @return A valid SecurityToken if the ident and password are valid.
44       * @throws CommunitySecurityException If the security check fails.
45       * @throws CommunityServiceException If there is an internal error in service.
46       * @throws CommunityIdentifierException If the account identifier is invalid.
47       * @throws RemoteException If the WebService call fails.
48       *
49       */
50      public SecurityToken checkPassword(String account, String pass)
51          throws RemoteException, CommunityServiceException, CommunitySecurityException, CommunityIdentifierException ;
52  
53      /***
54       * Validate a SecurityToken.
55       * Validates a token, and creates a new tokens issued to the same account.
56       * @param token The token to validate.
57       * @return A new SecurityToken if the original was valid.
58       * @throws CommunitySecurityException If the security check fails.
59       * @throws CommunityServiceException If there is an internal error in service.
60       * @throws CommunityIdentifierException If the token is invalid.
61       * @throws RemoteException If the WebService call fails.
62       *
63       */
64      public SecurityToken checkToken(SecurityToken token)
65          throws RemoteException, CommunityServiceException, CommunitySecurityException, CommunityIdentifierException ;
66  
67      /***
68       * Split a SecurityToken.
69       * Validates a token, and then creates a new set of tokens issued to the same account.
70       * @param token The token to validate.
71       * @param count The number of new tokens required.
72       * @return An array of new SecurityToken(s).
73       * @throws CommunitySecurityException If the security check fails.
74       * @throws CommunityServiceException If there is an internal error in service.
75       * @throws CommunityIdentifierException If the token is invalid.
76       * @throws RemoteException If the WebService call fails.
77       *
78       */
79      public Object[] splitToken(SecurityToken token, int count)
80          throws RemoteException, CommunityServiceException, CommunitySecurityException, CommunityIdentifierException ;
81  
82      }