Class ShellBasedUnixGroupsMapping

  • All Implemented Interfaces:
    GroupMappingService

    public final class ShellBasedUnixGroupsMapping
    extends java.lang.Object
    implements GroupMappingService
    A simple shell-based implementation of GroupMappingService that exec's the groups shell command to fetch the group memberships of a given user.
    • Method Detail

      • getGroups

        public java.util.List<java.lang.String> getGroups​(java.lang.String user)
                                                   throws java.io.IOException
        Returns list of groups for a user.
        Specified by:
        getGroups in interface GroupMappingService
        Parameters:
        user - get groups for this user
        Returns:
        list of groups for a given user
        Throws:
        java.io.IOException