Class RunAsIdentity

    • Constructor Detail

      • RunAsIdentity

        public RunAsIdentity​(String roleName,
                             String principalName)
        Construct an inmutable instance of a RunAsIdentity
      • RunAsIdentity

        public RunAsIdentity​(String roleName,
                             String principalName,
                             Set<String> extraRoleNames)
        Construct an inmutable instance of a RunAsIdentity
    • Method Detail

      • getRunAsRoles

        public Set<Principal> getRunAsRoles()
        Return a set with the configured run-as role
        Returns:
        Set for the run-as roles
      • getRunAsRolesAsRoleGroup

        public RoleGroup getRunAsRolesAsRoleGroup()
        Return a RoleGroup of Run-As roles
        Returns:
      • getPrincipalsSet

        public Set<Principal> getPrincipalsSet()
        Return a set with the configured run-as principal and a Group("Roles") with the run-as roles
        Returns:
        Set for the run-as principal and roles
      • doesUserHaveRole

        public boolean doesUserHaveRole​(Principal role)
      • doesUserHaveRole

        public boolean doesUserHaveRole​(Set<Principal> methodRoles)
        True if the run-as principal has any of the method roles
      • getIdentity

        public <T> T getIdentity()
        Description copied from interface: RunAs
        Return the identity represented
        Specified by:
        getIdentity in interface RunAs
        Returns:
      • getProof

        public <T> T getProof()
        Description copied from interface: RunAs
        Return the proof of identity
        Specified by:
        getProof in interface RunAs
        Returns: