Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.p13n.controls.userInfoQuery
Interface UserInfoControl

All Superinterfaces
  Serializable

    @ControlInterface
    public interface UserInfoControl

extends Serializable

This control is used to query information about a particular user, such as which groups the user belongs to, which roles the user is in, which roles are available to the user.
Security requirements: The caller must be in the role of "PortalSystemAdministrator" to invoke method 'getAllGroupNames()

Method Summary
`void` | `authenticate(String username, String password)` Authenticate a user.
`List<String>` | `getAllGroupNames()` Deprecated Use GroupProviderControl.getAllGroupNames()
`String` | `getAuthenticatedUserId(javax.servlet.http.HttpServletRequest request)` Get the authenticated user from the request object
`List<String>` | `getAvailableUserRoles(javax.servlet.http.HttpServletRequest request)` Get a list of role names that the user is in
`List<String>` | `getGroupNamesForUser(String username)` Get a list of groups to which this user belongs This method federated through all readable GroupProviders in default security realm
`List<String>` | `getUserGroupNames(javax.servlet.http.HttpServletRequest request)` Get a list of groups to which this user belongs This method federated through all readable GroupProviders in default security realm
`boolean` | `isCurrentUserInRole(javax.servlet.http.HttpServletRequest request, String roleName)` Determine whether this user is allowed in this particular role
`boolean` | `isMemberOfGroup(String groupname, String username)` Determine if a user is a member of a group This method federated through all readable GroupProviders in default security realm
`boolean` | `userIsRegistered(javax.servlet.http.HttpServletRequest request)` Determine whether this user is a registered user type

Method Detail

### authenticate

    void authenticate(String username,
                      String password)
                      throws P13nControlException

  Authenticate a user. This method is only used to verify a username and password. It does not do anything to "log in" or set the user as the "current" system user.

  Parameters
    `username` - the username for the user
    `password` - the password for the user
  Throws
    `P13nControlException` - if the user is not a valid user or credentials are incorrect

### isMemberOfGroup

    boolean isMemberOfGroup(String groupname,
                            String username)
                            throws P13nControlException

  Determine if a user is a member of a group This method federated through all readable GroupProviders in default security realm

  Parameters
    `groupname` - the group to query
    `username` - the user to look for
  Throws
    `P13nControlException` - if exceptions encountered accessing backing GroupProvider

### getAllGroupNames

    List<String> getAllGroupNames()
                                  throws P13nControlException

  Deprecated Use GroupProviderControl.getAllGroupNames()

  Get a List of all group names This method federated through all readable GroupProviders in default security realm

  Returns
    a List of all group names in the system
  Throws
    `P13nControlException` - if exceptions encountered accessing backing GroupProvider or if user is not in the role of 'PortalSystemAdministrator' or 'Admin'

### getUserGroupNames

    List<String> getUserGroupNames(javax.servlet.http.HttpServletRequest request)
                                   throws P13nControlException

  Get a list of groups to which this user belongs This method federated through all readable GroupProviders in default security realm

  Parameters
    `request` - object, which will contain current user name
  Returns
    List of group names (String) to which the user belongs
  Throws
    `P13nControlException` - if exceptions encountered accessing backing GroupProvider

### getGroupNamesForUser

    List<String> getGroupNamesForUser(String username)
                                      throws P13nControlException

  Get a list of groups to which this user belongs This method federated through all readable GroupProviders in default security realm

  Parameters
    `username` - Current user name
  Returns
    List of group names (String) to which the user belongs
  Throws
    `P13nControlException` - if exceptions encountered accessing backing GroupProvider

### getAvailableUserRoles

    List<String> getAvailableUserRoles(javax.servlet.http.HttpServletRequest request)
                                       throws P13nControlException

  Get a list of role names that the user is in

  Parameters
    `request` - the HttpServletRequest object
  Returns
    a List of role names (String) available to this user or null if no roles exist for this user.
  Throws
    `P13nControlException` - if exceptions encountered accessing backing security service

### isCurrentUserInRole

    boolean isCurrentUserInRole(javax.servlet.http.HttpServletRequest request,
                                String roleName)
                                throws P13nControlException

  Determine whether this user is allowed in this particular role

  Parameters
    `request` - the HttpServletRequest object
    `roleName` - The name of the role, defined as one of the available Portal roles
  Returns
    true if the named role is available for the user
  Throws
    `P13nControlException` - if remote exceptions encountered accessing backing security service

### userIsRegistered

    boolean userIsRegistered(javax.servlet.http.HttpServletRequest request)
                             throws P13nControlException

  Determine whether this user is a registered user type

  Parameters
    `request` - the HttpServletRequest object
  Returns
    true if the user is of registered user type
  Throws
    `P13nControlException` - if request is null

### getAuthenticatedUserId

    String getAuthenticatedUserId(javax.servlet.http.HttpServletRequest request)
                                  throws P13nControlException

  Get the authenticated user from the request object

  Parameters
    `request` - the HttpServletRequest object
  Returns
    the username of the authenticated user, or null if not authenticated
  Throws
    `P13nControlException` - if remote exceptions encountered accessing backing security service

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.