protected User createUserFromId(String name) { return new SimpleUser(name); }
public RoleQueryBuilder setUser(String id) { checkNotNullArgument(id, "User id"); this.user = new SimpleUser(id); return this; }
public GroupQueryBuilder addUserConnectedByRole(String id) { checkNotNullArgument(id, "User id"); usersConnectedByRole.add(new SimpleUser(id)); return this; }
public GroupQueryBuilder addAssociatedUser(String id) { checkNotNullArgument(id, "User id"); usersAssociated.add(new SimpleUser(id)); return this; }
public GroupQueryBuilder addAssociatedUsersKeys(Collection<String> ids) { checkNotNullArgument(ids, "Users ids"); for (String id : ids) { usersAssociated.add(new SimpleUser(id)); } return this; }
protected User createUser(IdentityObject identityObject) { return new SimpleUser(identityObject.getName()); }
public GroupQueryBuilder addUsersIdsConnectedByRole(Collection<String> ids) { checkNotNullArgument(ids, "Users ids"); for (String id : ids) { usersConnectedByRole.add(new SimpleUser(id)); } return this; }
public GroupQueryBuilder addRelatedUser(String id) { checkNotNullArgument(id, "User id"); usersRelated.add(new SimpleUser(id)); return this; }
public void addMember(String id) { if (GroupKey.validateKey(id)) { members.add(new SimpleGroup(new GroupKey(id))); return; } members.add(new SimpleUser(id)); }
public void addParent(String id) { if (GroupKey.validateKey(id)) { parents.add(new SimpleGroup(new GroupKey(id))); return; } parents.add(new SimpleUser(id)); }
protected IdentityType createIdentityTypeFromId(String id) { if (GroupKey.validateKey(id)) { GroupKey groupKey = new GroupKey(id); return new SimpleGroup(groupKey); } else { return new SimpleUser(id); } }
protected IdentityType createIdentityTypeFromId(String id) { if (GroupKey.validateKey(id)) { GroupKey groupKey = new GroupKey(id); return new SimpleGroup(groupKey); } else { return new SimpleUser(id); } }
public void authenticate() { if (getJaasConfigName() == null) { throw new IllegalStateException("jaasConfigName cannot be null. Please set it to a valid JAAS configuration name."); } try { getLoginContext().login(); setStatus(AuthenticationStatus.SUCCESS); setUser(new SimpleUser(credentials.getUsername())); //SEAMSECURITY-98 } catch (LoginException e) { setStatus(AuthenticationStatus.FAILURE); log.error("JAAS authentication failed", e); } }
public void removeUser(String userName, boolean force) throws IdentityException { try { checkNotNullArgument(userName, "User name"); preRemove(new SimpleUser(userName)); getRepository().removeIdentityObject(getInvocationContext(), createIdentityObjectForUserName(userName)); if (cache != null) { //TODO: maybe invalidate only part cache.invalidate(cacheNS); } postRemove(new SimpleUser(userName)); } catch (IdentityException e) { if (log.isLoggable(Level.FINER)) { log.log(Level.FINER, "Exception occurred: ", e); } throw e; } }
attrs = am.getAttributes(new SimpleUser(user.getUserName())); } catch (Exception e) {
User memberUser = new SimpleUser(member);
preCreate(new SimpleUser(identityName)); user = new SimpleUser(identityName);
public void associateUserByKeys(String parentId, String memberId) throws IdentityException { try { checkNotNullArgument(parentId, "Parent group Id"); checkNotNullArgument(memberId, "Member user Id"); Group parent = new SimpleGroup(new GroupKey(parentId)); User member = new SimpleUser(memberId); preUserAssociationCreate(parent, member); getRepository().createRelationship(getInvocationContext(), createIdentityObjectForGroupId(parentId), createIdentityObjectForUserName(memberId), MEMBER, null, true); if (cache != null) { cache.invalidateAllQueries(cacheNS); cache.invalidateAllSearches(cacheNS); } postUserAssociationCreate(parent, member); } catch (IdentityException e) { if (log.isLoggable(Level.FINER)) { log.log(Level.FINER, "Exception occurred: ", e); } throw e; } }
public void authenticate() { if (identitySession != null) { User u = new SimpleUser(credentials.getUsername());