Clover Coverage Report
Coverage timestamp: Sun Mar 23 2008 08:24:39 GMT
0   65   1   -
0   5   -   0
0     -  
1    
 
 
  CredentialsService       Line # 49 0 1 - -1.0
 
No Tests
 
1    /*
2    * Copyright (c) 2000-2005, University of Salford
3    * All rights reserved.
4    *
5    * Redistribution and use in source and binary forms, with or without
6    * modification, are permitted provided that the following conditions are met:
7    *
8    * Redistributions of source code must retain the above copyright notice, this
9    * list of conditions and the following disclaimer.
10    *
11    * Redistributions in binary form must reproduce the above copyright notice,
12    * this list of conditions and the following disclaimer in the documentation
13    * and/or other materials provided with the distribution.
14    *
15    * Neither the name of the University of Salford nor the names of its
16    * contributors may be used to endorse or promote products derived from this
17    * software without specific prior written permission.
18    *
19    * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20    * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21    * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22    * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23    * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24    * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25    * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26    * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27    * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28    * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29    * POSSIBILITY OF SUCH DAMAGE.
30    */
31   
32    package issrg.pba;
33   
34    /**
35    * This interface defines a call-back mechanism to let the AEF (Access decision
36    * Enforcement Function; refer to ISO 10181-3 access control framework) define
37    * its own criteria for credential usage. It is envisaged a Session Time can be
38    * useful in this respect, so a SessionTimeService object should implement this
39    * interface and notify the caller when the session time has elapsed. The actual
40    * implementations may not only throw exceptions, but may encapsulate references
41    * to their own call-back objects.
42    *
43    * <p>In case the set of credentials is not suitable for use, or a decision
44    * cannot be made, a PbaException should be thrown.
45    *
46    * @author A Otenko
47    */
48   
 
49    public interface CredentialsService {
50    /**
51    * This method provides the required service. It should always throw
52    * an exception if the subject is not suitable for use.
53    *
54    * <p>The method is always called at decision time and the thrown
55    * exception, if any, will be passed on to the AEF.
56    *
57    * @param user is the subject that contains the credentials on which
58    * the service is exerted
59    *
60    * @throws PbaException in case the credentials cannot be used
61    */
62    public void service(Subject user) throws PbaException;
63   
64    public void service(Subject user,Target target, Action action) throws PbaException;
65    }