Package org.jivesoftware.openfire.auth
Interface AuthProvider
-
- All Known Implementing Classes:
CrowdAuthProvider,DefaultAuthProvider,HybridAuthProvider,JDBCAuthProvider,LdapAuthProvider,MappedAuthProvider,NativeAuthProvider,POP3AuthProvider
public interface AuthProviderProvider interface for authentication. Users that wish to integrate with their own authentication system must implement this class and then register the implementation with Openfire in theopenfire.xmlfile. An entry in that file would look like the following:<provider> <auth> <className>com.foo.auth.CustomAuthProvider</className> </auth> </provider>- Author:
- Matt Tucker
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidauthenticate(String username, String password)Returns if the username and password are valid; otherwise this method throws an UnauthorizedException.intgetIterations(String username)StringgetPassword(String username)Returns the user's password.StringgetSalt(String username)StringgetServerKey(String username)StringgetStoredKey(String username)booleanisScramSupported()voidsetPassword(String username, String password)Sets the users's password.booleansupportsPasswordRetrieval()Returns true if this UserProvider is able to retrieve user passwords from the backend user store.
-
-
-
Method Detail
-
authenticate
void authenticate(String username, String password) throws UnauthorizedException, ConnectionException, InternalUnauthenticatedException
Returns if the username and password are valid; otherwise this method throws an UnauthorizedException.- Parameters:
username- the username or full JID.password- the password- Throws:
UnauthorizedException- if the username and password do not match any existing user.ConnectionException- it there is a problem connecting to user and group systemInternalUnauthenticatedException- if there is a problem authentication Openfire itself into the user and group system
-
getPassword
String getPassword(String username) throws UserNotFoundException, UnsupportedOperationException
Returns the user's password. This method should throw an UnsupportedOperationException if this operation is not supported by the backend user store.- Parameters:
username- the username of the user.- Returns:
- the user's password.
- Throws:
UserNotFoundException- if the given user's password could not be loaded.UnsupportedOperationException- if the provider does not support the operation (this is an optional operation).
-
setPassword
void setPassword(String username, String password) throws UserNotFoundException, UnsupportedOperationException
Sets the users's password. This method should throw an UnsupportedOperationException if this operation is not supported by the backend user store.- Parameters:
username- the username of the user.password- the new plaintext password for the user.- Throws:
UserNotFoundException- if the given user could not be loaded.UnsupportedOperationException- if the provider does not support the operation (this is an optional operation).
-
supportsPasswordRetrieval
boolean supportsPasswordRetrieval()
Returns true if this UserProvider is able to retrieve user passwords from the backend user store. If this operation is not supported thengetPassword(String)will throw anUnsupportedOperationExceptionif invoked.- Returns:
- true if this UserProvider is able to retrieve user passwords from the backend user store.
-
isScramSupported
boolean isScramSupported()
-
getSalt
String getSalt(String username) throws UnsupportedOperationException, UserNotFoundException
-
getIterations
int getIterations(String username) throws UnsupportedOperationException, UserNotFoundException
-
getServerKey
String getServerKey(String username) throws UnsupportedOperationException, UserNotFoundException
-
getStoredKey
String getStoredKey(String username) throws UnsupportedOperationException, UserNotFoundException
-
-