Package tigase.db
Interface AuthRepository
-
- All Superinterfaces:
Repository
- All Known Implementing Classes:
AbstractAuthRepositoryWithCredentials,AuthRepositoryImpl,AuthRepositoryMDImpl,AuthRepositoryMDPoolBean,AuthRepositoryPool,DrupalWPAuth,DummyRepository,JDBCRepository,LdapAuthProvider,TigaseAuth,TigaseCustomAuth,TigaseSPAuth,XMLRepository
public interface AuthRepository extends Repository
InterfaceAuthRepositorydefines a proxy bridge between user authentication data storage and the Tigase server authentication logic. Important thing about the authentication repository is that it not only stores login credentials but also performs actual user authentication. This is because available authentication mechanisms depend on the way data are stored in the repository (database).
Created: Sun Nov 5 21:15:46 2006- Author:
- Artur Hefczyc
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classAuthRepository.AccountStatusstatic classAuthRepository.DefaultCredentialsstatic classAuthRepository.SingleCredential-
Nested classes/interfaces inherited from interface tigase.db.Repository
Repository.Meta, Repository.SchemaId
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDATA_KEYProperty key name forotherAuthmethod call.static java.lang.StringDIGEST_ID_KEYstatic java.lang.StringDIGEST_KEYstatic java.lang.StringMACHANISM_KEYProperty key name forotherAuthmethod call.static java.lang.StringPASSWORD_KEYstatic java.lang.StringPROTOCOL_KEYProperty key name forotherAuthmethod call.static java.lang.StringPROTOCOL_VAL_NONSASLProperty value forotherAuthmethod call.static java.lang.StringPROTOCOL_VAL_SASLProperty value forotherAuthmethod call.static java.lang.StringREALM_KEYProperty key name forotherAuthmethod call.static java.lang.StringRESULT_KEYProperty key name forotherAuthmethod call.static java.lang.StringSERVER_NAME_KEYProperty key name forotherAuthmethod call.static java.lang.StringUSER_ID_KEYProperty key name forotherAuthmethod call.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description voidaddUser(BareJID user, java.lang.String password)AuthRepository.AccountStatusgetAccountStatus(BareJID user)default java.util.Collection<java.lang.String>getCredentialIds(BareJID user)default CredentialsgetCredentials(BareJID user, java.lang.String credentialId)java.lang.StringgetPassword(BareJID user)Deprecated.java.lang.StringgetResourceUri()getResourceUrimethod returns database connection string.default java.util.Collection<java.lang.String>getUsernames(BareJID user)Deprecated.longgetUsersCount()This method is only used by the server statistics component to report number of registered users.longgetUsersCount(java.lang.String domain)This method is only used by the server statistics component to report number of registered users for given domain.default booleanisMechanismSupported(java.lang.String domain, java.lang.String mechanism)default booleanisUserDisabled(BareJID user)Deprecated.voidloggedIn(BareJID jid)Do some actions on repository, when user logs in.voidlogout(BareJID user)booleanotherAuth(java.util.Map<java.lang.String,java.lang.Object> authProps)Deprecated.voidqueryAuth(java.util.Map<java.lang.String,java.lang.Object> authProps)Deprecated.default voidremoveCredential(BareJID user, java.lang.String credentialId)voidremoveUser(BareJID user)voidsetAccountStatus(BareJID user, AuthRepository.AccountStatus status)default voidsetCredentialsCodecs(CredentialsEncoderBean encoder, CredentialsDecoderBean decoder)default voidsetUserDisabled(BareJID user, java.lang.Boolean value)Deprecated.default voidupdateCredential(BareJID user, java.lang.String credentialId, java.lang.String password)voidupdatePassword(BareJID user, java.lang.String password)Deprecated.-
Methods inherited from interface tigase.db.Repository
initRepository
-
-
-
-
Field Detail
-
DATA_KEY
static final java.lang.String DATA_KEY
Property key name forotherAuthmethod call. It is used to provide an extra authentication data by the client to the authentication logic. Please note theRESULT_KEYproperty key is used to provide authentication data from the server to the client. This property is used to provide authentication data from the client to the server.- See Also:
- Constant Field Values
-
DIGEST_ID_KEY
static final java.lang.String DIGEST_ID_KEY
- See Also:
- Constant Field Values
-
DIGEST_KEY
static final java.lang.String DIGEST_KEY
- See Also:
- Constant Field Values
-
MACHANISM_KEY
static final java.lang.String MACHANISM_KEY
Property key name forotherAuthmethod call. It is used to provide desired authentication mechanism to the authentication logic.- See Also:
- Constant Field Values
-
PASSWORD_KEY
static final java.lang.String PASSWORD_KEY
- See Also:
- Constant Field Values
-
PROTOCOL_KEY
static final java.lang.String PROTOCOL_KEY
Property key name forotherAuthmethod call. It is used to provide desired authentication protocol to the authentication logic.- See Also:
- Constant Field Values
-
PROTOCOL_VAL_NONSASL
static final java.lang.String PROTOCOL_VAL_NONSASL
Property value forotherAuthmethod call. It is used to provide desired authentication NON-SASL protocol to the authentication logic.- See Also:
- Constant Field Values
-
PROTOCOL_VAL_SASL
static final java.lang.String PROTOCOL_VAL_SASL
Property value forotherAuthmethod call. It is used to provide desired authentication SASL protocol to the authentication logic.- See Also:
- Constant Field Values
-
REALM_KEY
static final java.lang.String REALM_KEY
Property key name forotherAuthmethod call. It is used to provide authentication realm to the authentication logic. In most cases, the realm is just a domain name.- See Also:
- Constant Field Values
-
RESULT_KEY
static final java.lang.String RESULT_KEY
Property key name forotherAuthmethod call. It is used to provide authentication handshaking data during login process. Some authentication mechanisms require exchanging requests between the client and the server. This property key points back to the data which need to be sent back to the client.- See Also:
- Constant Field Values
-
SERVER_NAME_KEY
static final java.lang.String SERVER_NAME_KEY
Property key name forotherAuthmethod call. It is used to provide authentication domain to the authentication logic. It is highly recommended that this property is always set, even if the authentication protocol/mechanism does not need it strictly.- See Also:
- Constant Field Values
-
USER_ID_KEY
static final java.lang.String USER_ID_KEY
Property key name forotherAuthmethod call. It is used to provide a user ID on successful user login. Please note, the key points to the object ofBareJIDtype.- See Also:
- Constant Field Values
-
-
Method Detail
-
addUser
void addUser(BareJID user, java.lang.String password) throws TigaseDBException
- Throws:
TigaseDBException
-
getAccountStatus
AuthRepository.AccountStatus getAccountStatus(BareJID user) throws TigaseDBException
- Throws:
TigaseDBException
-
getCredentials
default Credentials getCredentials(BareJID user, java.lang.String credentialId) throws TigaseDBException
- Throws:
TigaseDBException
-
getPassword
@Deprecated java.lang.String getPassword(BareJID user) throws TigaseDBException
Deprecated.- Throws:
TigaseDBException
-
getResourceUri
java.lang.String getResourceUri()
getResourceUrimethod returns database connection string.- Returns:
- a
Stringvalue of database connection string.
-
getCredentialIds
default java.util.Collection<java.lang.String> getCredentialIds(BareJID user) throws TigaseDBException
- Throws:
TigaseDBException
-
getUsernames
@Deprecated default java.util.Collection<java.lang.String> getUsernames(BareJID user) throws TigaseDBException
Deprecated.- Throws:
TigaseDBException
-
getUsersCount
long getUsersCount()
This method is only used by the server statistics component to report number of registered users.- Returns:
- a
longnumber of registered users in the repository.
-
getUsersCount
long getUsersCount(java.lang.String domain)
This method is only used by the server statistics component to report number of registered users for given domain.- Parameters:
domain- for which get the statistics- Returns:
- a
longnumber of registered users in the repository.
-
isMechanismSupported
default boolean isMechanismSupported(java.lang.String domain, java.lang.String mechanism)
-
isUserDisabled
@Deprecated default boolean isUserDisabled(BareJID user) throws TigaseDBException
Deprecated.- Throws:
TigaseDBException
-
loggedIn
void loggedIn(BareJID jid) throws TigaseDBException
Do some actions on repository, when user logs in. (for example updatelast_login_time)- Parameters:
jid- JID of logged user.- Throws:
TigaseDBException- if an error occurs
-
logout
void logout(BareJID user) throws TigaseDBException
- Throws:
TigaseDBException
-
otherAuth
@Deprecated boolean otherAuth(java.util.Map<java.lang.String,java.lang.Object> authProps) throws TigaseDBException, AuthorizationExceptionDeprecated.
-
queryAuth
@Deprecated void queryAuth(java.util.Map<java.lang.String,java.lang.Object> authProps)
Deprecated.queryAuthreturns mechanisms available for authentication.- Parameters:
authProps- aMapvalue with parameters for authentication.
-
removeCredential
default void removeCredential(BareJID user, java.lang.String credentialId) throws TigaseDBException
- Throws:
TigaseDBException
-
removeUser
void removeUser(BareJID user) throws TigaseDBException
- Throws:
TigaseDBException
-
setAccountStatus
void setAccountStatus(BareJID user, AuthRepository.AccountStatus status) throws TigaseDBException
- Throws:
TigaseDBException
-
setCredentialsCodecs
default void setCredentialsCodecs(CredentialsEncoderBean encoder, CredentialsDecoderBean decoder)
-
setUserDisabled
@Deprecated default void setUserDisabled(BareJID user, java.lang.Boolean value) throws TigaseDBException
Deprecated.- Throws:
TigaseDBException
-
updateCredential
default void updateCredential(BareJID user, java.lang.String credentialId, java.lang.String password) throws TigaseDBException
- Throws:
TigaseDBException
-
updatePassword
@Deprecated void updatePassword(BareJID user, java.lang.String password) throws TigaseDBException
Deprecated.- Throws:
TigaseDBException
-
-