Class DatabaseUserKeyService
- java.lang.Object
-
- fr.paris.lutece.plugins.mylutece.modules.database.authentication.service.key.DatabaseUserKeyService
-
public final class DatabaseUserKeyService extends java.lang.ObjectDatabaseUserKeyService
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DatabaseUserKeycreate(int nUserId)Create a new user key from a given user idDatabaseUserKeyfindByPrimaryKey(java.lang.String strKey)Find the keyDatabaseUserKeyfindKeyByLogin(java.lang.String strLogin)Get a key of a user by his loginjava.lang.StringgetReinitUrl(java.lang.String strKey, javax.servlet.http.HttpServletRequest request)Get reinit urlstatic DatabaseUserKeyServicegetService()Get the instance of the servicejava.lang.StringgetValidationUrl(java.lang.String strKey, javax.servlet.http.HttpServletRequest request)Build the validation urlvoidremove(java.lang.String strKey)Remove a keyvoidremoveByIdUser(int nUserId)Remove a key from a given id user
-
-
-
Method Detail
-
getService
public static DatabaseUserKeyService getService()
Get the instance of the service- Returns:
- the instance of the service
-
create
public DatabaseUserKey create(int nUserId)
Create a new user key from a given user id- Parameters:
nUserId- the id user- Returns:
- the key
-
findByPrimaryKey
public DatabaseUserKey findByPrimaryKey(java.lang.String strKey)
Find the key- Parameters:
strKey- the key- Returns:
- the key
-
findKeyByLogin
public DatabaseUserKey findKeyByLogin(java.lang.String strLogin)
Get a key of a user by his login- Parameters:
strLogin- The login of the user- Returns:
- A key associated to the user
-
remove
public void remove(java.lang.String strKey)
Remove a key- Parameters:
strKey- the key
-
removeByIdUser
public void removeByIdUser(int nUserId)
Remove a key from a given id user- Parameters:
nUserId- the id user
-
getValidationUrl
public java.lang.String getValidationUrl(java.lang.String strKey, javax.servlet.http.HttpServletRequest request)Build the validation url- Parameters:
strKey- the keyrequest- the HTTP request- Returns:
- the validation url
-
getReinitUrl
public java.lang.String getReinitUrl(java.lang.String strKey, javax.servlet.http.HttpServletRequest request)Get reinit url- Parameters:
strKey- the keyrequest- the HTTP request- Returns:
- the url
-
-