@RequestScoped public class PamServicesWs extends Object
Modifier and Type | Class and Description |
---|---|
static class |
PamServicesWs.ErrorCodes |
static class |
PamServicesWs.PAMServicesWSFault |
Constructor and Description |
---|
PamServicesWs() |
Modifier and Type | Method and Description |
---|---|
PamVerifyResult |
changePassword(String userId,
char[] oldPassword,
char[] newPassword,
boolean mustBeChanged,
Boolean chapCompatibility)
Changes the password of a user.
|
PamVerifyResult |
verify(String userId,
char[] password)
Verifies User and clear text password.
|
public PamVerifyResult verify(String userId, char[] password) throws PamServicesWs.PAMServicesWSFault
userId
- The unique user id for the user.password
- The clear text password.PamVerifyResult.VerificationResultsCode.OK
- if the verification was successful.
PamVerifyResult.VerificationResultsCode.LOCKED
- if the user is locked because the retry counter has exceeded.
PamVerifyResult.VerificationResultsCode.TEMPORARY_LOCKED
- if the user is temporary locked.
PamVerifyResult.VerificationResultsCode.MUST_CHANGE
- if the password must be changed.
PamVerifyResult.VerificationResultsCode.NEW_PASSWORD_EQUALS_OLD
- if the old password and the new password are equal.
PamVerifyResult.VerificationResultsCode.PASSWORD_RESTRICTION_FAILED
- if the new password does not match the password restrictions.
PamVerifyResult.VerificationResultsCode.WRONG_PASSWORD
- if the verification fails but the user still has retries.PamServicesWs.PAMServicesWSFault
- PamServicesWs.ErrorCodes.USERID_INVALID
- if the userId is null or empty.
PamServicesWs.ErrorCodes.PASSWORD_NULL
- if the password is null or empty.
PamServicesWs.ErrorCodes.USER_NOT_FOUND
- if the user does not exist.
PamServicesWs.ErrorCodes.NOT_PAM_USER
- if the user id has not been identified as PAM user (has no password assigned).
PamServicesWs.ErrorCodes.GENERAL_ERROR
- if an internal error occurred.public PamVerifyResult changePassword(String userId, char[] oldPassword, char[] newPassword, boolean mustBeChanged, Boolean chapCompatibility) throws PamServicesWs.PAMServicesWSFault
If requested, the password is marked so that the user must change next time using it.
The password is verified according to configured password restrictions. I.e. either restrictions are defined in PAM advanced settings or a custom specific extension is installed.
userId
- The unique user id for the user.oldPassword
- The old password in clear text.newPassword
- The new password in clear text.mustBeChanged
- If true, the user has to change the password the next time he logs in.chapCompatibility
- (optional) If set to true, password is stored in a CHAP
compatible way. If this parameter is not provided, then
default configuration as defined in PAM Advanced Settings is
applied.PamVerifyResult.VerificationResultsCode.OK
- if the verification was successful.
PamVerifyResult.VerificationResultsCode.LOCKED
- if the user is locked (i.e. the user entered a wrong old password too many times (max retries exceeds)).
PamVerifyResult.VerificationResultsCode.TEMPORARY_LOCKED
- if the user is temporary locked.
PamVerifyResult.VerificationResultsCode.MUST_CHANGE
- if the password must be changed.
PamVerifyResult.VerificationResultsCode.NEW_PASSWORD_EQUALS_OLD
- if the old password and the new password are equal.
PamVerifyResult.VerificationResultsCode.PASSWORD_RESTRICTION_FAILED
- if the new password does not match the password restrictions.PamServicesWs.PAMServicesWSFault
- PamServicesWs.ErrorCodes.USERID_INVALID
- if the userId is null or empty.
PamServicesWs.ErrorCodes.PASSWORD_NULL
- if at least one of the given passwords is null or empty.
PamServicesWs.ErrorCodes.USER_NOT_FOUND
- if the user does not exist.
PamServicesWs.ErrorCodes.NOT_PAM_USER
- if the user id has not been identified as PAM user (has no password assigned).
PamServicesWs.ErrorCodes.GENERAL_ERROR
- if an internal error occurred.Copyright © 2022 KOBIL Systems GmbH. All rights reserved.