| | |
| | | */ |
| | | protected ClientConnection() |
| | | { |
| | | |
| | | connectTime = TimeThread.getTime(); |
| | | connectTimeString = TimeThread.getUTCTime(); |
| | | authenticationInfo = new AuthenticationInfo(); |
| | |
| | | */ |
| | | public long getConnectTime() |
| | | { |
| | | |
| | | return connectTime; |
| | | } |
| | | |
| | |
| | | */ |
| | | public String getConnectTimeString() |
| | | { |
| | | |
| | | return connectTimeString; |
| | | } |
| | | |
| | |
| | | public final boolean sendIntermediateResponse( |
| | | IntermediateResponse intermediateResponse) |
| | | { |
| | | |
| | | |
| | | // Invoke the intermediate response plugins for the response |
| | | // message. |
| | | PluginConfigManager pluginConfigManager = |
| | |
| | | boolean sendNotification, |
| | | int messageID, Object... arguments) |
| | | { |
| | | |
| | | String message = getMessage(messageID, arguments); |
| | | disconnect(disconnectReason, sendNotification, message, |
| | | messageID); |
| | |
| | | */ |
| | | public boolean bindInProgress() |
| | | { |
| | | |
| | | return bindInProgress; |
| | | } |
| | | |
| | |
| | | */ |
| | | public void setBindInProgress(boolean bindInProgress) |
| | | { |
| | | |
| | | this.bindInProgress = bindInProgress; |
| | | } |
| | | |
| | |
| | | */ |
| | | public boolean mustChangePassword() |
| | | { |
| | | |
| | | if (authenticationInfo == null) |
| | | { |
| | | return false; |
| | |
| | | */ |
| | | public void setMustChangePassword(boolean mustChangePassword) |
| | | { |
| | | |
| | | if (authenticationInfo == null) |
| | | { |
| | | authenticationInfo = new AuthenticationInfo(); |
| | |
| | | public CopyOnWriteArrayList<PersistentSearch> |
| | | getPersistentSearches() |
| | | { |
| | | |
| | | return persistentSearches; |
| | | } |
| | | |
| | |
| | | public void registerPersistentSearch(PersistentSearch |
| | | persistentSearch) |
| | | { |
| | | |
| | | persistentSearches.add(persistentSearch); |
| | | } |
| | | |
| | |
| | | public void deregisterPersistentSearch(PersistentSearch |
| | | persistentSearch) |
| | | { |
| | | |
| | | persistentSearches.remove(persistentSearch); |
| | | } |
| | | |
| | |
| | | */ |
| | | public AuthenticationInfo getAuthenticationInfo() |
| | | { |
| | | |
| | | return authenticationInfo; |
| | | } |
| | | |
| | |
| | | public void setAuthenticationInfo(AuthenticationInfo |
| | | authenticationInfo) |
| | | { |
| | | |
| | | if (this.authenticationInfo != null) |
| | | { |
| | | Entry authNEntry = |
| | |
| | | */ |
| | | public void updateAuthenticationInfo(Entry oldEntry, Entry newEntry) |
| | | { |
| | | |
| | | Entry authNEntry = authenticationInfo.getAuthenticationEntry(); |
| | | Entry authZEntry = authenticationInfo.getAuthorizationEntry(); |
| | | |
| | |
| | | */ |
| | | public void setUnauthenticated() |
| | | { |
| | | |
| | | this.authenticationInfo = new AuthenticationInfo(); |
| | | this.sizeLimit = DirectoryServer.getSizeLimit(); |
| | | this.timeLimit = DirectoryServer.getTimeLimit(); |
| | |
| | | public boolean hasPrivilege(Privilege privilege, |
| | | Operation operation) |
| | | { |
| | | |
| | | boolean result = privileges.contains(privilege); |
| | | if (operation == null) |
| | | { |
| | |
| | | public boolean hasAllPrivileges(Privilege[] privileges, |
| | | Operation operation) |
| | | { |
| | | |
| | | HashSet<Privilege> privSet = this.privileges; |
| | | boolean result = true; |
| | | StringBuilder buffer = new StringBuilder(); |
| | |
| | | */ |
| | | private void updatePrivileges(Entry entry, boolean isRoot) |
| | | { |
| | | |
| | | HashSet<Privilege> newPrivileges = new HashSet<Privilege>(); |
| | | HashSet<Privilege> removePrivileges = new HashSet<Privilege>(); |
| | | |
| | |
| | | */ |
| | | public final Object getSASLAuthStateInfo() |
| | | { |
| | | |
| | | return saslAuthState; |
| | | } |
| | | |
| | |
| | | */ |
| | | public final void setSASLAuthStateInfo(Object saslAuthState) |
| | | { |
| | | |
| | | this.saslAuthState = saslAuthState; |
| | | } |
| | | |
| | |
| | | */ |
| | | public final int getSizeLimit() |
| | | { |
| | | |
| | | return sizeLimit; |
| | | } |
| | | |
| | |
| | | */ |
| | | public final void setSizeLimit(int sizeLimit) |
| | | { |
| | | |
| | | this.sizeLimit = sizeLimit; |
| | | } |
| | | |
| | |
| | | */ |
| | | public final int getLookthroughLimit() |
| | | { |
| | | |
| | | return lookthroughLimit; |
| | | } |
| | | |
| | |
| | | */ |
| | | public final void setLookthroughLimit(int lookthroughLimit) |
| | | { |
| | | |
| | | this.lookthroughLimit = lookthroughLimit; |
| | | } |
| | | |
| | |
| | | */ |
| | | public final int getTimeLimit() |
| | | { |
| | | |
| | | return timeLimit; |
| | | } |
| | | |
| | |
| | | */ |
| | | public final void setTimeLimit(int timeLimit) |
| | | { |
| | | |
| | | this.timeLimit = timeLimit; |
| | | } |
| | | |
| | |
| | | public boolean isMemberOf(Group group, Operation operation) |
| | | throws DirectoryException |
| | | { |
| | | |
| | | if (operation == null) |
| | | { |
| | | return group.isMember(authenticationInfo.getAuthorizationDN()); |
| | |
| | | public Set<Group> getGroups(Operation operation) |
| | | throws DirectoryException |
| | | { |
| | | |
| | | |
| | | // FIXME -- This probably isn't the most efficient implementation. |
| | | DN authzDN; |
| | | if (operation == null) |
| | |
| | | */ |
| | | public DN getKeyManagerProviderDN() |
| | | { |
| | | |
| | | // In the default implementation, we'll return null. |
| | | return null; |
| | | } |
| | |
| | | */ |
| | | public DN getTrustManagerProviderDN() |
| | | { |
| | | |
| | | // In the default implementation, we'll return null. |
| | | return null; |
| | | } |
| | |
| | | */ |
| | | public final String toString() |
| | | { |
| | | |
| | | StringBuilder buffer = new StringBuilder(); |
| | | toString(buffer); |
| | | return buffer.toString(); |