API 2 Documentation for opendaylight.controller.usermanager 98/298/1
authorMaurice Qureshi <maquresh@cisco.com>
Mon, 6 May 2013 07:52:19 +0000 (00:52 -0700)
committerMaurice Qureshi <maquresh@cisco.com>
Mon, 6 May 2013 07:52:19 +0000 (00:52 -0700)
Signed-off-by: Maurice Qureshi <maquresh@cisco.com>
opendaylight/usermanager/src/main/java/org/opendaylight/controller/usermanager/IAAAProvider.java
opendaylight/usermanager/src/main/java/org/opendaylight/controller/usermanager/ISessionManager.java
opendaylight/usermanager/src/main/java/org/opendaylight/controller/usermanager/IUserManager.java

index 2e330d85edb75ef663adae85dd16d9c1bba17b48..0fb26a1a625ce21afb1c883c8f642e1baa0cba97 100644 (file)
@@ -1,4 +1,3 @@
-
 /*
  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
  *
 package org.opendaylight.controller.usermanager;
 
 /**
- * IAAAProvider exposes a pluggable interface for 3rd party Authentication and Authorization
- * providers to support the UserManager with AAA management.
+ * IAAAProvider exposes a pluggable interface for 3rd party Authentication and
+ * Authorization providers to support the UserManager with AAA management.
  */
 
 public interface IAAAProvider {
 
     /**
-     * Authenticate user with AAA server and return authentication and authorization info
-     * using the Provider's mechanism
+     * Authenticate user with AAA server and return authentication and
+     * authorization info using the Provider's mechanism
+     * 
      * @param userName
+     *            the username
      * @param password
+     *            the password
      * @param server
+     *            AAA server ip address in string form
      * @param secretKey
-     * @return Authentication and Authorization Response
+     *            shared secret between the AAA client and AAA server
+     * @return {@link org.opendaylight.controller.usermanager.AuthResponse}
+     *         Authentication and Authorization Response
      */
     public AuthResponse authService(String userName, String password,
             String server, String secretKey);
 
     /**
      * Returns the Name of the Provider
-     *
+     * 
      * @return Name of the AAA provider
      */
     public String getName();
index 1a423a2cf0982f0f0d428eb6ed93008e56639d8b..8149d7a5a2a8add3566eb4e2970a97769d03ec65 100644 (file)
@@ -10,8 +10,20 @@ package org.opendaylight.controller.usermanager;
 
 import javax.servlet.http.HttpSessionListener;
 
+/**
+ * 
+ * This interface defines method(s) to invalidate a session.
+ */
 public interface ISessionManager extends HttpSessionListener {
 
+    /**
+     * Invalidates the session for a given user and a session Id
+     * 
+     * @param username
+     *            the username
+     * @param sessionId
+     *            the session Id
+     */
     public void invalidateSessions(String username, String sessionId);
 
 }
index a998ac3670fc85b54808ca265aa5cf14196ce0f4..0ec9445b1eea24c10559a91bbbbe57a19c7f6b7f 100644 (file)
@@ -1,4 +1,3 @@
-
 /*
  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
  *
@@ -29,183 +28,240 @@ public interface IUserManager extends UserDetailsService {
 
     /**
      * Returns the list of roles associated to the passed user name
-     *
+     * 
      * @param userName
      * @return the role associated to the user name
      */
     public List<String> getUserRoles(String userName);
 
     /**
-     * Authenticate user with AAA server and return authentication and authorization info
-     *
-     * @param username the username
-     * @param password the password
-     * @return                 {@link org.opendaylight.controller.sal.authorization.AuthResultEnum authenticate result}
+     * Authenticate user with AAA server and return authentication and
+     * authorization info
+     * 
+     * @param username
+     *            the username
+     * @param password
+     *            the password
+     * @return {@link org.opendaylight.controller.sal.authorization.AuthResultEnum}
+     *         authentication result
      */
     public AuthResultEnum authenticate(String username, String password);
 
     /**
      * Add/remove AAA server
-     *
-     * @param configObject     refer to {@link org.opendaylight.controller.usermanager.internal.ServerConfig ServerConfig}
-     * @return                         status code
+     * 
+     * @param configObject
+     *            {@link org.opendaylight.controller.usermanager.internal.ServerConfig}
+     *            Server Configuration
+     * @return {@link org.opendaylight.controller.sal.utils.Status}
+     *         status of this action
      */
     public Status addAAAServer(ServerConfig configObject);
 
     /**
      * Remove AAA server
-     *
-     * @param configObject     refer to {@link org.opendaylight.controller.usermanager.internal.ServerConfig ServerConfig}
-     * @return                         status code
+     * 
+     * @param configObject
+     *            refer to
+     *            {@link org.opendaylight.controller.usermanager.internal.ServerConfig}
+     *            Server Configuration
+     * @return {@link org.opendaylight.controller.sal.utils.Status}
+     *         status of this action
      */
     public Status removeAAAServer(ServerConfig configObject);
 
     /**
      * Add a local user
-     *
-     * @param configObject refer to {@link org.opendaylight.controller.usermanager.internal.UserConfig UserConfig}
-     * @return                         status code
+     * 
+     * @param configObject
+     *            {@link org.opendaylight.controller.usermanager.internal.UserConfig}
+     *            User Configuration
+     * @return refer to {@link org.opendaylight.controller.sal.utils.Status}
+     *         status code
      */
     public Status addLocalUser(UserConfig configObject);
 
     /**
      * Remove a local user
-     *
-     * @param configObject refer to {@link org.opendaylight.controller.usermanager.internal.UserConfig UserConfig}
-     * @return                         status code
+     * 
+     * @param configObject
+     *            {@link org.opendaylight.controller.usermanager.internal.UserConfig}
+     *            UserConfig
+     * @return {@link org.opendaylight.controller.sal.utils.Status}
+     *         status of this action
      */
     public Status removeLocalUser(UserConfig configObject);
-    
+
     /**
      * Remove a local user
      * 
-     * @param userName the user name
-     * @return the status of this action
+     * @param userName
+     *            the user name
+     * @return {@link org.opendaylight.controller.sal.utils.Status}
+     *         status of this action
      */
     public Status removeLocalUser(String userName);
 
     /**
-     * Add the authorization information for a user that gets authenticated remotely
-     *
+     * Add the authorization information for a user that gets authenticated
+     * remotely
+     * 
      * @param AAAconf
-     * @return
+     *            {@link org.opendaylight.controller.usermanager.internal.AuthorizationConfig}
+     *            Authorization Resources
+     * @return {@link org.opendaylight.controller.sal.utils.Status}
+     *         status of this action
      */
     public Status addAuthInfo(AuthorizationConfig AAAconf);
 
     /**
-     * Remove the authorization information for a user that gets authenticated remotely
-     *
+     * Remove the authorization information for a user that gets authenticated
+     * remotely
+     * 
      * @param AAAconf
-     * @return
+     *            {@link org.opendaylight.controller.usermanager.internal.AuthorizationConfig}
+     *            Authorization Resource
+     * @return {@link org.opendaylight.controller.sal.utils.Status}
+     *         status of this action
      */
     public Status removeAuthInfo(AuthorizationConfig AAAconf);
 
     /**
      * Return the list of authorization resources
-     * @return
+     * 
+     * @return {@link org.opendaylight.controller.usermanager.internal.AuthorizationConfig}
+     *         List of Authorization Resource
      */
     public List<AuthorizationConfig> getAuthorizationList();
 
     /**
      * Returns a list of AAA Providers.
+     * 
      * @return Set of provider names.
      */
     public Set<String> getAAAProviderNames();
 
     /**
-     * Change the current password for a configured user
-     *
+     * Change the current password for a locally configured user
+     * 
      * @param user
+     *            the username
      * @param curPasssword
+     *            the current password
      * @param newPassword
-     * @return
+     *            the new password
+     * @return {@link org.opendaylight.controller.sal.utils.Status}
+     *         status of this action
      */
     public Status changeLocalUserPassword(String user, String curPassword,
             String newPassword);
 
     /**
      * Return a list of AAA servers currently configured
-     *
-     * @return list of {@link org.opendaylight.controller.usermanager.internal.ServerConfig ServerConfig}
+     * 
+     * @return {@link org.opendaylight.controller.usermanager.internal.ServerConfig}
+     *         List of ServerConfig
      */
     public List<ServerConfig> getAAAServerList();
 
     /**
      * Return a list of local users
-     *
-     * @return list of {@link org.opendaylight.controller.usermanager.internal.UserConfig UserConfig}
+     * 
+     * @return {@link org.opendaylight.controller.usermanager.internal.UserConfig}
+     *         List of UserConfig
      */
     public List<UserConfig> getLocalUserList();
 
     /**
-     * Save the local users to local disk
-     *
-     * @return status code
+     * Save the local users to disk
+     * 
+     * @return {@link org.opendaylight.controller.sal.utils.Status}
+     *         status of this action
      */
     public Status saveLocalUserList();
 
     /**
-     * Save the AAA server configurations to local disk
-     *
-     * @return status code
+     * Save the AAA server configurations to disk
+     * 
+     * @return {@link org.opendaylight.controller.sal.utils.Status}
+     *         status of this action
      */
     public Status saveAAAServerList();
 
     /**
-     * Save the Authorization configurations to local disk
-     *
-     * @return status code
+     * Save the Authorization configurations to disk
+     * 
+     * @return {@link org.opendaylight.controller.sal.utils.Status}
+     *         status code
      */
     public Status saveAuthorizationList();
 
     /**
      * Remove user profile when user logs out
-     *
-     * @param username the user name
+     * 
+     * @param username
+     *            the user name
      */
     public void userLogout(String username);
 
     /**
      * Remove user profile when user times out
-     *
-     * @param username the user name
+     * 
+     * @param username
+     *            the user name
      */
     public void userTimedOut(String username);
 
     /**
      * Get the list of users currently logged in
-     *
+     * 
      * @return the list of users along with their administrative roles
      */
     public Map<String, List<String>> getUserLoggedIn();
 
     /**
      * Get date and time user was successfully authenticated
-     *
+     * 
      * @param user
      * @return Date in String format
      */
     public String getAccessDate(String user);
 
     /**
-     * Returns the user level for the passed user name
-     * It check the roles assigned to this user and checks
-     * against the well known Controller user roles to
-     * determines the highest user level associated with
-     * the user
-     *
-     * @param userName the user name
-     * @return the highest user level for this user
+     * Returns the user level for the passed user name. It checks the roles
+     * assigned to this user and checks against the well known Controller user
+     * roles to determines the highest user level associated with the user
+     * 
+     * @param userName
+     *            the user name
+     * @return {@link org.opendaylight.controller.sal.authorization.UserLevel}
+     *         the highest user level for this user
      */
     public UserLevel getUserLevel(String userName);
 
-    // For internal use. Place holder to move securityContext storage.
+    /**
+     * Returns the Security Context
+     * 
+     * @returns {@link org.springframework.security.web.context.SecurityContextRepository}
+     *          Security Context
+     */
     public SecurityContextRepository getSecurityContextRepo();
 
-    // Session manager to implement session mgmt across web-apps
+    /**
+     * Returns the Session Manager Interface Handler
+     * 
+     * @return {@link org.opendaylight.controller.usermanager.ISessionManager}
+     *         session manager interface handler
+     */
     public ISessionManager getSessionManager();
-    
-    
+
+    /* non-Javadoc
+     * Returns the password for a given user
+     * 
+     * @param username
+     *            the user name
+     * @return password for the username
+     */
     public String getPassword(String username);
 
 }