站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 server API Documentation 英文版文档

RealmMapping (JBoss Server API) - JBoss 4.0.1 sp1 server API Documentation 英文版文档


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.


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