| | |
| | | public void initializeSASLMechanismHandler(ConfigEntry configEntry) |
| | | throws ConfigException, InitializationException |
| | | { |
| | | |
| | | |
| | | this.configEntryDN = configEntry.getDN(); |
| | | |
| | | |
| | |
| | | @Override() |
| | | public void finalizeSASLMechanismHandler() |
| | | { |
| | | |
| | | DirectoryServer.deregisterConfigurableComponent(this); |
| | | DirectoryServer.deregisterSASLMechanismHandler(SASL_MECHANISM_DIGEST_MD5); |
| | | } |
| | |
| | | @Override() |
| | | public void processSASLBind(BindOperation bindOperation) |
| | | { |
| | | |
| | | |
| | | // The DIGEST-MD5 bind process uses two stages. See if the client provided |
| | | // any credentials. If not, then this is an initial authentication so we |
| | | // will send a challenge to the client. |
| | |
| | | */ |
| | | private String generateNonce() |
| | | { |
| | | |
| | | byte[] nonceBytes = new byte[16]; |
| | | |
| | | digestLock.lock(); |
| | |
| | | StringBuilder token) |
| | | throws DirectoryException |
| | | { |
| | | |
| | | |
| | | // If the position is greater than or equal to the length, then we shouldn't |
| | | // do anything. |
| | | if (startPos >= length) |
| | |
| | | String qop, String charset) |
| | | throws UnsupportedEncodingException |
| | | { |
| | | |
| | | digestLock.lock(); |
| | | |
| | | try |
| | |
| | | String qop, String charset) |
| | | throws UnsupportedEncodingException |
| | | { |
| | | |
| | | digestLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | private String getHexString(byte[] byteArray) |
| | | { |
| | | |
| | | StringBuilder buffer = new StringBuilder(2*byteArray.length); |
| | | for (byte b : byteArray) |
| | | { |
| | |
| | | */ |
| | | public DN getConfigurableComponentEntryDN() |
| | | { |
| | | |
| | | return configEntryDN; |
| | | } |
| | | |
| | |
| | | */ |
| | | public List<ConfigAttribute> getConfigurationAttributes() |
| | | { |
| | | |
| | | |
| | | LinkedList<ConfigAttribute> attrList = new LinkedList<ConfigAttribute>(); |
| | | |
| | | int msgID = MSGID_SASLDIGESTMD5_DESCRIPTION_IDENTITY_MAPPER_DN; |
| | |
| | | public boolean hasAcceptableConfiguration(ConfigEntry configEntry, |
| | | List<String> unacceptableReasons) |
| | | { |
| | | |
| | | |
| | | // Look at the identity mapper configuration. |
| | | int msgID = MSGID_SASLDIGESTMD5_DESCRIPTION_IDENTITY_MAPPER_DN; |
| | | DNConfigAttribute mapperStub = |
| | |
| | | public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry, |
| | | boolean detailedResults) |
| | | { |
| | | |
| | | |
| | | ResultCode resultCode = ResultCode.SUCCESS; |
| | | boolean adminActionRequired = false; |
| | | ArrayList<String> messages = new ArrayList<String>(); |
| | |
| | | @Override() |
| | | public boolean isPasswordBased(String mechanism) |
| | | { |
| | | |
| | | // This is a password-based mechanism. |
| | | return true; |
| | | } |
| | |
| | | @Override() |
| | | public boolean isSecure(String mechanism) |
| | | { |
| | | |
| | | // This may be considered a secure mechanism. |
| | | return true; |
| | | } |