Get a named UserRealm.
@param realmName The name of the realm or null.
@return The named realm. If the name is null and only a single realm
is known, that is returned.
322316
public UserRealm getRealm(String realmName)
    {
        if (realmName==null)
        {
            if (_realmMap.size()==1)
                return (UserRealm)_realmMap.values().iterator().next();
            log.warn("Null realmName with multiple known realms");
        }
        return (UserRealm)_realmMap.get(realmName);
    }
699565
@Nullable
  public IUser getUserOfLoginName (@Nullable final String sLoginName)
  {
    if (StringHelper.hasNoText (sLoginName))
      return null;

    return findFirst (x -> x.getLoginName ().equals (sLoginName));
  }
651820
protected String getKeycloakUsername(final HttpServletRequest req, HttpServletResponse resp) {
        AtomicReference<String> username = new AtomicReference<>();
        Authenticator.authenticate(
            authConfiguration, req,
            subject -> {
                username.set(AuthHelpers.getUsername(subject));

                // Start httpSession
                req.getSession(true);
            }
        );
        return username.get();
    }
1184078
public UserCustomDao getUserDao(String tableName) {
		return UserCustomDao.readTable(getGeoPackage().getName(), connection,
				tableName);
	}
886312
public String getRealmName() {
        if (realmName == null || realmName.trim().equals("")) {
            realmName = getDefaultRealmName();
        }
        return realmName;
    }
525255
private String getRealmNameOrFirstBest(Root root) {
        String value = null;
        value = getRealmName(root);
        if (value == null) {
            try {
                value = getRealmName();
            } catch (Exception e) {
                // leave realm at null
            }
        }
        return value;
    }
91875
public Entity getEntityByName(String entityName) {
        Entity entity = currentEntitiesByName.get(entityName.toUpperCase());
        Assert.notNull(entity, "You must be sure that an entity is present. Entity name=" + entityName);
        return entity;
    }
933442
public UserDetails loadUserByUsername(String username)
        throws UsernameNotFoundException {
        UserDetails userDetails = usersTable.get(username);
        if (null == userDetails) {
            throw new UsernameNotFoundException(username);
        }
        return userDetails;
    }
1308769
private static String getCurrentUserName() {
        Authentication a = SecurityContextHolder.getContext().getAuthentication();
        if (a == null) return null;
        org.springframework.security.core.userdetails.User u =
                (org.springframework.security.core.userdetails.User)
                        a.getPrincipal();
        if (u == null) return null;
        return u.getUsername();
    }
1111660
public Response lockoutUser(String username) {
		return restClient.post("lockouts/" + username, null, new HashMap<String, String>());
	}
366169
public User get(String loginname, String password) {
        Connection conn = null;
        User user = null;
        if (loginname == null || password == null) return null;
        String cryptpassword = MD5.encodeString(password,null);
        try {
            conn = ConnectionUtils.getConnection();
            user = userDAO.get(conn,loginname,cryptpassword);
        } catch(SQLException e) {
            logger.error(e.getMessage());
        } finally {
            DbUtils.closeQuietly(conn);
        }
        return user;
    }
593831
def getDomainRealm(self, inputURL, environ):
        """"""
        # we don't get the realm here, its already been resolved in
        # request_resolver
        if inputURL.startswith("/"):
            inputURL = inputURL[1:]
        parts = inputURL.split("/")
        return parts[0]
504710
private function get_realm()
    {
        // When user enters a username without domain part, realm
        // allows to add it to the username (and display correct username in the table)

        if (isset($_SESSION['acl_username_realm'])) {
            return $_SESSION['acl_username_realm'];
        }

        // find realm in username of logged user (?)
        list($name, $domain) = explode('@', $_SESSION['username']);

        // Use (always existent) ACL entry on the INBOX for the user to determine
        // whether or not the user ID in ACL entries need to be qualified and how
        // they would need to be qualified.
        if (empty($domain)) {
            $acl = $this->rc->storage->get_acl('INBOX');
            if (is_array($acl)) {
                $regexp = '/^' . preg_quote($_SESSION['username'], '/') . '@(.*)$/';
                foreach (array_keys($acl) as $name) {
                    if (preg_match($regexp, $name, $matches)) {
                        $domain = $matches[1];
                        break;
                    }
                }
            }
        }

        return $_SESSION['acl_username_realm'] = $domain;
    }
698154
@Override
  public Collection<Realm> getRealms() {
    ArrayList<Realm> rss = new ArrayList<Realm>();

    Set<String> keys = new HashSet<String>(this.realmNameToRealmSet.keySet());
    for (String key : keys) {
      RealmSet rs = this.realmNameToRealmSet.get(key);
      rss.addAll(rs.values());
    }
    return rss;
  }
1193132
public String getUserRegistryRealm(AtomicServiceReference<SecurityService> securityServiceRef) {
        String realm = "defaultRealm";
        try {
            SecurityService securityService = securityServiceRef.getService();
            UserRegistryService userRegistryService = securityService.getUserRegistryService();
            if (userRegistryService.isUserRegistryConfigured()) {
                realm = userRegistryService.getUserRegistry().getRealm();
            }
        } catch (RegistryException re) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "RegistryException while trying to get the realm", re);
            }
        }
        return realm;
    }
46558
public function getRealms(array $realms = array())
    {
        if (empty($realms)) {
            $response = $this->get('realm/status');
        } else {
            $this->setQueryParam('realms', implode(',', $realms));
            $response = $this->get('realm/status');
        }

        if(empty($realms) || count($response['realms']) === count($realms)) {
            return $response['realms'];
        } else {
            return false;
        }
    }
217619
public static aaauser[] get(nitro_service service, String username[]) throws Exception{
		if (username !=null && username.length>0) {
			aaauser response[] = new aaauser[username.length];
			aaauser obj[] = new aaauser[username.length];
			for (int i=0;i<username.length;i++) {
				obj[i] = new aaauser();
				obj[i].set_username(username[i]);
				response[i] = (aaauser) obj[i].get_resource(service);
			}
			return response;
		}
		return null;
	}