View Javadoc

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