| | |
| | | public void initializePasswordStorageScheme(ConfigEntry configEntry) |
| | | throws ConfigException, InitializationException |
| | | { |
| | | |
| | | // No initialization is required. |
| | | } |
| | | |
| | |
| | | @Override() |
| | | public String getStorageSchemeName() |
| | | { |
| | | |
| | | return STORAGE_SCHEME_NAME_CLEAR; |
| | | } |
| | | |
| | |
| | | public ByteString encodePassword(ByteString plaintext) |
| | | throws DirectoryException |
| | | { |
| | | |
| | | return plaintext.duplicate(); |
| | | } |
| | | |
| | |
| | | public ByteString encodePasswordWithScheme(ByteString plaintext) |
| | | throws DirectoryException |
| | | { |
| | | |
| | | StringBuilder buffer = new StringBuilder(); |
| | | buffer.append('{'); |
| | | buffer.append(STORAGE_SCHEME_NAME_CLEAR); |
| | |
| | | public boolean passwordMatches(ByteString plaintextPassword, |
| | | ByteString storedPassword) |
| | | { |
| | | |
| | | return Arrays.equals(plaintextPassword.value(), storedPassword.value()); |
| | | } |
| | | |
| | |
| | | @Override() |
| | | public boolean isReversible() |
| | | { |
| | | |
| | | return true; |
| | | } |
| | | |
| | |
| | | public ByteString getPlaintextValue(ByteString storedPassword) |
| | | throws DirectoryException |
| | | { |
| | | |
| | | return storedPassword.duplicate(); |
| | | } |
| | | |
| | |
| | | @Override() |
| | | public boolean supportsAuthPasswordSyntax() |
| | | { |
| | | |
| | | // This storage scheme does not support the authentication password syntax. |
| | | return false; |
| | | } |
| | |
| | | public ByteString encodeAuthPassword(ByteString plaintext) |
| | | throws DirectoryException |
| | | { |
| | | |
| | | |
| | | int msgID = MSGID_PWSCHEME_DOES_NOT_SUPPORT_AUTH_PASSWORD; |
| | | String message = getMessage(msgID, getStorageSchemeName()); |
| | | throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, message, |
| | |
| | | public boolean authPasswordMatches(ByteString plaintextPassword, |
| | | String authInfo, String authValue) |
| | | { |
| | | |
| | | |
| | | // This storage scheme does not support the authentication password syntax. |
| | | return false; |
| | | } |
| | |
| | | String authValue) |
| | | throws DirectoryException |
| | | { |
| | | |
| | | int msgID = MSGID_PWSCHEME_DOES_NOT_SUPPORT_AUTH_PASSWORD; |
| | | String message = getMessage(msgID, getStorageSchemeName()); |
| | | throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, message, |
| | |
| | | @Override() |
| | | public boolean isStorageSchemeSecure() |
| | | { |
| | | |
| | | // Clear-text passwords are not obscured in any way. |
| | | return false; |
| | | } |