001
014
015 package com.liferay.portal.security.auth;
016
017 import com.liferay.portal.kernel.util.ArrayUtil;
018 import com.liferay.portal.kernel.util.StringPool;
019
020 import javax.naming.ldap.Control;
021
022
025 public class LDAPAuthResult {
026
027 public String getErrorMessage() {
028 return _errorMessage;
029 }
030
031 public String getResponseControl() {
032 return _responseControl;
033 }
034
035 public boolean isAuthenticated() {
036 return _authenticated;
037 }
038
039 public void setAuthenticated(boolean authenticated) {
040 _authenticated = authenticated;
041 }
042
043 public void setErrorMessage(String errorMessage) {
044 _errorMessage = errorMessage;
045 }
046
047 public void setResponseControl(Control[] response) {
048 if (ArrayUtil.isNotEmpty(response)) {
049 _responseControl = response[0].getID();
050 }
051 }
052
053 private boolean _authenticated;
054 private String _errorMessage;
055 private String _responseControl = StringPool.BLANK;
056
057 }