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

## org.jboss.security
Interface RealmMapping

All Known Subinterfaces:
  SecurityDomain

All Known Implementing Classes:
  NoAccessSecurityManager, NullSecurityManager

public interface RealmMapping

The interface for Principal mapping. It defines the mapping from the operational environment Principal to the application domain principal via the `getPrincipal` method. It also defines the method for validating the application domain roles to which the operational environment Principal belongs via the `getPrincipal` method.

Version:
  $Revision: 1.8 $
Author:
  Scott.Stark@jboss.org

Method Summary
`boolean` | `doesUserHaveRole(Principal principal, Set roles)` Validates the application domain roles to which the operational environment Principal belongs.
`Principal` | `getPrincipal(Principal principal)` Map from the operational environment Principal to the application domain principal.
`Set` | `getUserRoles(Principal principal)` Return the set of domain roles the principal has been assigned.

Method Detail

### getPrincipal

    public Principal getPrincipal(Principal principal)

  Map from the operational environment Principal to the application domain principal. This is used by the EJBContext.getCallerPrincipal implentation to map from the authenticated principal to a principal in the application domain.

  Parameters:
    `principal` - the caller principal as known in the operation environment.
  Returns:
    the principal

### doesUserHaveRole

    public boolean doesUserHaveRole(Principal principal,
                                    Set roles)

  Validates the application domain roles to which the operational environment Principal belongs.

  Parameters:
    `principal` - the caller principal as known in the operation environment.
    `roles` - The Set for the application domain roles that the principal is to be validated against.
  Returns:
    true if the principal has at least one of the roles in the roles set, false otherwise.

### getUserRoles

    public Set getUserRoles(Principal principal)

  Return the set of domain roles the principal has been assigned.

  Returns:
    The Set for the application domain roles that the principal has been assigned.

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

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.