Package tigase.db
Interface AuthRepository
- All Superinterfaces:
Repository
- All Known Implementing Classes:
AbstractAuthRepositoryWithCredentials,AuthRepositoryImpl,AuthRepositoryMDImpl,AuthRepositoryMDPoolBean,AuthRepositoryPool,DummyRepository,JDBCRepository,LdapAuthProvider,TigaseAuth,TigaseCustomAuth,TigaseSPAuth,XMLRepository
Interface
Created: Sun Nov 5 21:15:46 2006
AuthRepository defines 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 ClassesModifier and TypeInterfaceDescriptionstatic enumstatic classstatic classNested classes/interfaces inherited from interface tigase.db.Repository
Repository.Meta, Repository.SchemaId -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringProperty key name forotherAuthmethod call.static final Stringstatic final Stringstatic final StringProperty key name forotherAuthmethod call.static final Stringstatic final StringProperty key name forotherAuthmethod call.static final StringProperty value forotherAuthmethod call.static final StringProperty value forotherAuthmethod call.static final StringProperty key name forotherAuthmethod call.static final StringProperty key name forotherAuthmethod call.static final StringProperty key name forotherAuthmethod call.static final StringProperty key name forotherAuthmethod call. -
Method Summary
Modifier and TypeMethodDescriptionvoidgetAccountStatus(BareJID user) longgetActiveUsersCountIn(Duration duration) default Collection<String> getCredentialIds(BareJID user) default CredentialsgetCredentials(BareJID user, String credentialId) getPassword(BareJID user) Deprecated.getResourceUrimethod returns database connection string.default Collection<String> getUsernames(BareJID user) Deprecated.longThis method is only used by the server statistics component to report number of registered users.longgetUsersCount(String domain) This method is only used by the server statistics component to report number of registered users for given domain.default booleanisMechanismSupported(String domain, String mechanism) default booleanisUserDisabled(BareJID user) Deprecated.voidDo some actions on repository, when user logs in.voidbooleanDeprecated.voidDeprecated.default voidremoveCredential(BareJID user, String credentialId) voidremoveUser(BareJID user) voidsetAccountStatus(BareJID user, AuthRepository.AccountStatus status) default voidsetCredentialsCodecs(CredentialsEncoderBean encoder, CredentialsDecoderBean decoder) default voidsetUserDisabled(BareJID user, Boolean value) Deprecated.default voidupdateCredential(BareJID user, String credentialId, String password) default voidupdateCredential(BareJID user, String credentialId, String mechanism, String data) voidupdatePassword(BareJID user, String password) Deprecated.Methods inherited from interface tigase.db.Repository
initRepository
-
Field Details
-
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:
-
DIGEST_ID_KEY
- See Also:
-
DIGEST_KEY
- See Also:
-
MACHANISM_KEY
Property key name forotherAuthmethod call. It is used to provide desired authentication mechanism to the authentication logic.- See Also:
-
PASSWORD_KEY
- See Also:
-
PROTOCOL_KEY
Property key name forotherAuthmethod call. It is used to provide desired authentication protocol to the authentication logic.- See Also:
-
PROTOCOL_VAL_NONSASL
Property value forotherAuthmethod call. It is used to provide desired authentication NON-SASL protocol to the authentication logic.- See Also:
-
PROTOCOL_VAL_SASL
Property value forotherAuthmethod call. It is used to provide desired authentication SASL protocol to the authentication logic.- See Also:
-
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:
-
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:
-
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:
-
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:
-
-
Method Details
-
addUser
- Throws:
TigaseDBException
-
getAccountStatus
- Throws:
TigaseDBException
-
getCredentials
- Throws:
TigaseDBException
-
getPassword
Deprecated.- Throws:
TigaseDBException
-
getResourceUri
String getResourceUri()getResourceUrimethod returns database connection string.- Returns:
- a
Stringvalue of database connection string.
-
getCredentialIds
- Throws:
TigaseDBException
-
getUsernames
Deprecated.- Throws:
TigaseDBException
-
getActiveUsersCountIn
- Parameters:
duration- Time range within which active users should be counted. Method is only used by statistics.- Returns:
- number of active users in required range
-
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
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
-
isUserDisabled
Deprecated.- Throws:
TigaseDBException
-
loggedIn
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
- Throws:
TigaseDBException
-
otherAuth
@Deprecated boolean otherAuth(Map<String, Object> authProps) throws TigaseDBException, AuthorizationExceptionDeprecated. -
queryAuth
Deprecated.queryAuthreturns mechanisms available for authentication.- Parameters:
authProps- aMapvalue with parameters for authentication.
-
removeCredential
- Throws:
TigaseDBException
-
removeUser
- Throws:
TigaseDBException
-
setAccountStatus
- Throws:
TigaseDBException
-
setCredentialsCodecs
-
setUserDisabled
Deprecated.- Throws:
TigaseDBException
-
updateCredential
default void updateCredential(BareJID user, String credentialId, String password) throws TigaseDBException - Throws:
TigaseDBException
-
updateCredential
default void updateCredential(BareJID user, String credentialId, String mechanism, String data) throws TigaseDBException - Throws:
TigaseDBException
-
updatePassword
Deprecated.- Throws:
TigaseDBException
-