/** * Invoke the native authentication call. * * @param username User to authenticate. * @param password Given password. * @returns true of false, indicating authentication status. * */ public String[] authenticate(String username, String password) { String[] grps = nativeAuthenticate(username, password); if(grps != null){ grps = addAssignGroups(grps); } setGroupNames(username, grps); return grps; }
/** * Returns the name of all the groups that this user belongs to. * This is called from web path role verification, though * it should not be. * * @param username Name of the user in this realm whose group listing * is needed. * @return Enumeration of group names (strings). * @exception InvalidOperationException thrown if the realm does not * support this operation - e.g. Certificate realm does not support * this operation. */ public Enumeration getGroupNames (String username) throws InvalidOperationException, NoSuchUserException { Vector v = (Vector)groupCache.get(username); if (v == null) { v = loadGroupNames(username); } return v.elements(); }
/** * Loads groups names for the given user by calling native method. * * <P>Group info is loaded when user authenticates, however in some * cases (such as run-as) the group membership info is needed * without an authentication event. * */ private Vector loadGroupNames(String username) { String[] grps = nativeGetGroups(username); if (grps == null) { _logger.fine("No groups returned for user: "+username); } grps = addAssignGroups(grps); setGroupNames(username, grps); return (Vector)groupCache.get(username); }
this.setProperty(IASRealm.JAAS_CONTEXT_PARAM, jaasCtx);
String[] grpList = solarisRealm.authenticate(_username, getPasswordChar());
this.setProperty(IASRealm.JAAS_CONTEXT_PARAM, jaasCtx);
String[] grpList = solarisRealm.authenticate(_username, getPasswordChar());
/** * Invoke the native authentication call. * * @param username User to authenticate. * @param password Given password. * @returns true of false, indicating authentication status. * */ public String[] authenticate(String username, char[] password) { String[] grps = nativeAuthenticate(username, new String(password)); if(grps != null){ grps = addAssignGroups(grps); } setGroupNames(username, grps); return grps; }
/** * Loads groups names for the given user by calling native method. * * <P>Group info is loaded when user authenticates, however in some * cases (such as run-as) the group membership info is needed * without an authentication event. * */ private Vector loadGroupNames(String username) { String[] grps = nativeGetGroups(username); if (grps == null) { _logger.fine("No groups returned for user: "+username); } grps = addAssignGroups(grps); setGroupNames(username, grps); return (Vector)groupCache.get(username); }
/** * Returns the name of all the groups that this user belongs to. * This is called from web path role verification, though * it should not be. * * @param username Name of the user in this realm whose group listing * is needed. * @return Enumeration of group names (strings). * @exception InvalidOperationException thrown if the realm does not * support this operation - e.g. Certificate realm does not support * this operation. */ public Enumeration getGroupNames (String username) throws InvalidOperationException, NoSuchUserException { Vector v = (Vector)groupCache.get(username); if (v == null) { v = loadGroupNames(username); } return v.elements(); }
this.setProperty(IASRealm.JAAS_CONTEXT_PARAM, jaasCtx);
/** * Invoke the native authentication call. * * @param username User to authenticate. * @param password Given password. * @returns true of false, indicating authentication status. * */ public String[] authenticate(String username, char[] password) { String[] grps = nativeAuthenticate(username, new String(password)); if(grps != null){ grps = addAssignGroups(grps); } setGroupNames(username, grps); return grps; }
/** * Loads groups names for the given user by calling native method. * * <P>Group info is loaded when user authenticates, however in some * cases (such as run-as) the group membership info is needed * without an authentication event. * */ private Vector loadGroupNames(String username) { String[] grps = nativeGetGroups(username); if (grps == null) { _logger.fine("No groups returned for user: "+username); } grps = addAssignGroups(grps); setGroupNames(username, grps); return (Vector)groupCache.get(username); }
/** * Returns the name of all the groups that this user belongs to. * This is called from web path role verification, though * it should not be. * * @param username Name of the user in this realm whose group listing * is needed. * @return Enumeration of group names (strings). * @exception InvalidOperationException thrown if the realm does not * support this operation - e.g. Certificate realm does not support * this operation. */ public Enumeration getGroupNames (String username) throws InvalidOperationException, NoSuchUserException { Vector v = (Vector)groupCache.get(username); if (v == null) { v = loadGroupNames(username); } return v.elements(); }