1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package no.feide.moria.webservices.v2_0;
22
23 import java.rmi.Remote;
24 import java.rmi.RemoteException;
25
26 /***
27 * @author Bjørn Ola Smievoll <b.o.smievoll@conduct.no>
28 * @version $Revision: 1.8 $
29 */
30 public interface AuthenticationIF extends Remote {
31
32 /***
33 * Initiates authentication.
34 *
35 * The initial call done by a service to start a login attempt.
36 *
37 * @param attributes
38 * The attributes the service wants returned on login
39 * @param returnURLPrefix
40 * The prefix of the url the user is to be returned to
41 * @param returnURLPostfix
42 * The optional postfix of the return url
43 * @param forceInteractiveAuthentication
44 * Whether or not cookie based authentication (SSO Light)
45 * should be allowed.
46 * @return The Moria url the client is to be redirected to.
47 * @throws RemoteException
48 * If anything fails during the call.
49 */
50 String initiateAuthentication(String[] attributes, String returnURLPrefix, String returnURLPostfix,
51 boolean forceInteractiveAuthentication) throws RemoteException;
52
53 /***
54 * Performs direct non-interactive authentication.
55 *
56 * A redirect- and html-less login method. Only to be used in
57 * special cases where the client for some reason does not
58 * support the standard login procedure. Inherently insecure as
59 * the service will have knowledge of the plaintext password.
60 *
61 * @param attributes
62 * The attributes the service wants returned on login.
63 * @param username
64 * The user name of the user to be authenticated.
65 * @param password
66 * The password of the user to be authenticated.
67 * @return Array of attributes as requested.
68 * @throws RemoteException
69 * If anything fails during the call.
70 */
71 Attribute[] directNonInteractiveAuthentication(String[] attributes, String username, String password) throws RemoteException;
72
73 /***
74 * Gets user attributes.
75 *
76 * Called by the service when the user returns after a successful
77 * login.
78 *
79 * @param serviceTicket
80 * The ticket included in the return request issued by the client.
81 * @return Array of attributes as requested in initiateAuthentication.
82 * @throws RemoteException
83 * If anything fails during the call.
84 */
85 Attribute[] getUserAttributes(String serviceTicket) throws RemoteException;
86
87 /***
88 * Verifies the existence of a given user in the underlying directories.
89 *
90 * @param username
91 * The username to be validated.
92 * @return true if the user is found.
93 * @throws RemoteException
94 * If anything fails during the call.
95 */
96 boolean verifyUserExistence(String username) throws RemoteException;
97 }