Package org.jboss.security
Interface RealmMapping
-
- All Known Subinterfaces:
SecurityDomain
- All Known Implementing Classes:
JaasSecurityManagerBase
,JASPIServerAuthenticationManager
,JBossAuthenticationManager
,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 thegetPrincipal
method. It also defines the method for validating the application domain roles to which the operational environment Principal belongs via thegetPrincipal
method.- Version:
- $Revision$
- Author:
- Scott.Stark@jboss.org
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
doesUserHaveRole(Principal principal, Set<Principal> 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<Principal>
getUserRoles(Principal principal)
Return the set of domain roles the principal has been assigned.
-
-
-
Method Detail
-
getPrincipal
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
boolean doesUserHaveRole(Principal principal, Set<Principal> 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 Setfor 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.
-
-