public interface IdVault
Modifier and Type | Interface and Description |
---|---|
static interface |
IdVault.IDAccessCallback<T>
Callback interface to work with an opened ID
|
static class |
IdVault.IdFlag
Flags of a User ID
|
static interface |
IdVault.SyncResult |
Modifier and Type | Method and Description |
---|---|
void |
changeIdPassword(Path idPath,
String oldPassword,
String newPassword)
This function changes the password in the specified ID file.
You can use this function to change the password in a user's id, a server's id, or a certifier's id. Multiple passwords are not supported. |
void |
checkIdPassword(Path idPath,
String password)
The method tries to open the ID with the specified password.
|
String |
extractUserIdFromVault(String userName,
String password,
Path idPath,
String serverName)
Will contact the server and locate a vault for
userName .Then extract the ID file from the vault and write it to idPath .If successful returns with the vault server name. |
Set<IdVault.IdFlag> |
getIdFlags()
Returns flags for the ID that is active for the current process
|
Set<IdVault.IdFlag> |
getIDFlags(UserId userId)
Returns flags for the specified ID file
|
UserId |
getUserIdFromVault(String userName,
String password,
String serverName)
Will contact the server and locate a vault for
userName .Then downloads the ID file from the vault and store it in memory. |
UserId |
getUserIdWithToken(Object token,
String serverName)
Will contact the server and retrieves the
UserId associated with the provided
implementation-specific token. |
String |
getUsernameFromId(Path idPath)
This function will extract the username from an ID file.
|
boolean |
isIdInVault(String userName,
String server)
Checks if the ID vault on the specified server contains an ID for a user
|
<T> T |
openUserIdFile(Path idPath,
String password,
IdVault.IDAccessCallback<T> callback)
Opens an ID file and returns an in-memory handle for signing (
Document.sign(UserId, boolean) )
and using note encrypting (Document.copyAndEncrypt(UserId, java.util.Collection) /
Document.decrypt(UserId) ). |
String |
putUserIdIntoVault(String userName,
String password,
Path idPath,
String serverName)
Will open the ID file name provided, locate a vault server for user
userName ,
upload the ID file contents to the vault, then return with the vault server name. |
String |
putUserIdIntoVault(String userName,
String password,
UserId userId,
String serverName)
Will locate a vault server for user
userName and
upload the specified ID contents to the vault, then return with the vault server name. |
void |
resetUserPasswordInVault(String server,
String userName,
String password,
int downloadCount)
Resets an ID password.
|
IdVault.SyncResult |
syncUserIdWithVault(String userName,
String password,
Path idPath,
String serverName)
Will open the ID file name provided, locate a vault server, synch the ID file contents to the vault,
then return the synched content.
|
String extractUserIdFromVault(String userName, String password, Path idPath, String serverName)
userName
.idPath
.userName
- Name of user whose ID is being put into vault - either abbreviated or canonical formatpassword
- Password to id file being uploaded to the vaultidPath
- Path to where the download ID file should be created or overwrittenserverName
- Name of server to contactDominoException
- in case of problems, e.g. ERR 22792 Wrong PasswordUserId getUserIdFromVault(String userName, String password, String serverName)
userName
.userName
- Name of user whose ID is being put into vault - either abbreviated or canonical formatpassword
- Password to id file being uploaded to the vaultserverName
- Name of server to contactDominoException
- in case of problems, e.g. ERR 22792 Wrong PasswordUserId getUserIdWithToken(Object token, String serverName)
UserId
associated with the provided
implementation-specific token.token
- the token to use to retrieve the ID. The class of the token depends on the available
vault provider implementationsserverName
- the name of the server to contactUnsupportedOperationException
- when no provider can be found to handle token
String putUserIdIntoVault(String userName, String password, Path idPath, String serverName)
userName
,
upload the ID file contents to the vault, then return with the vault server name.userName
- Name of user whose ID is being put into vault - either abbreviated or canonical formatpassword
- Password to id file being uploaded to the vaultidPath
- Path to where the download ID file should be created or overwrittenserverName
- Name of server to contactDominoException
- in case of problems, e.g. ERR 22792 Wrong PasswordString putUserIdIntoVault(String userName, String password, UserId userId, String serverName)
userName
and
upload the specified ID contents to the vault, then return with the vault server name.userName
- Name of user whose ID is being put into vault - either abbreviated or canonical formatpassword
- Password to id file being uploaded to the vaultuserId
- user idserverName
- Name of server to contactDominoException
- in case of problems, e.g. ERR 22792 Wrong PasswordIdVault.SyncResult syncUserIdWithVault(String userName, String password, Path idPath, String serverName)
userName
- Name of user whose ID is being put into vault - either abbreviated or canonical formatpassword
- Password to id file being uploaded to the vaultidPath
- Path to where the download ID file should be created or overwrittenserverName
- Name of server to contactvoid resetUserPasswordInVault(String server, String userName, String password, int downloadCount)
server
- Name of server to contact to request the password reset. Can be NULL if executed from a program or agent on a server. Does NOT have to be a vault server. But must be running Domino 8.5 or later.userName
- Name of user to reset their vault id file password.password
- New password to set in the vault record for pUserName.downloadCount
- (max. 65535) If this user's effective policy setting document has "allow automatic ID downloads" set to no, then this parameter specifies how many downloads the user can now perform. If downloads are automatic this setting should be zero.void changeIdPassword(Path idPath, String oldPassword, String newPassword)
idPath
- path to the ID file whose password should be changedoldPassword
- old password in the ID file. This parameter can only be NULL if there is no old password. If this parameter is set to "", then ERR_BSAFE_NULLPARAM is returnednewPassword
- new password on the ID file. If this parameter is NULL, the password is cleared. If the specified ID file requires a password and this parameter is NULL, then ERR_BSAFE_PASSWORD_REQUIRED is returned. If this parameter is set to "", then ERR_BSAFE_NULLPARAM is returned. If the specified ID file is set for a minimum password length and this string contains less than that minimum, then ERR_REG_MINPSWDCHARS is returned.void checkIdPassword(Path idPath, String password)
DominoException
idPath
- id pathpassword
- passwordDominoException
- e.g. ERR 6408 if password is incorrectString getUsernameFromId(Path idPath)
idPath
- id path<T> T openUserIdFile(Path idPath, String password, IdVault.IDAccessCallback<T> callback)
Document.sign(UserId, boolean)
)
and using note encrypting (Document.copyAndEncrypt(UserId, java.util.Collection)
/
Document.decrypt(UserId)
).T
- optional result typeidPath
- id path on diskpassword
- id passwordcallback
- callback code to access the opened ID; we automatically close the ID file when the callback invocation is doneboolean isIdInVault(String userName, String server)
userName
- user to checkserver
- serverSet<IdVault.IdFlag> getIdFlags()
Set<IdVault.IdFlag> getIDFlags(UserId userId)
userId
- user id, use null for the ID that is active for the current processCopyright © 2019–2021 HCL. All rights reserved.