Interface RealmMapping

    • 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 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

        Set<Principal> 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.