public PasswordType value(ProtectedStringType value) { setValue(value); return this; }
public static void cleanupShadowPassword(PasswordType p) { p.setValue(null); }
public static PasswordType createPasswordType(String password) { PasswordType passwordType = new PasswordType(); passwordType.setValue(createProtectedString(password)); return passwordType; }
public static void setPassword(CredentialsType credentials, ProtectedStringType password) { PasswordType credPass = credentials.getPassword(); if (credPass == null) { credPass = new PasswordType(); credentials.setPassword(credPass); } credPass.setValue(password); }
public static PasswordType createPasswordType(String password) { PasswordType passwordType = new PasswordType(); passwordType.setValue(createProtectedString(password)); return passwordType; }
public static void setPassword(ShadowType shadowType, ProtectedStringType password) { CredentialsType credentialsType = shadowType.getCredentials(); if (credentialsType == null) { credentialsType = new CredentialsType(); shadowType.setCredentials(credentialsType); } PasswordType passwordType = credentialsType.getPassword(); if (passwordType == null) { passwordType = new PasswordType(); credentialsType.setPassword(passwordType); } passwordType.setValue(password); }
protected void modifyUserSetPassword(String userOid, String newPassword, Task task, OperationResult result) throws ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, ObjectAlreadyExistsException, PolicyViolationException, SecurityViolationException { ProtectedStringType userPasswordPs = new ProtectedStringType(); userPasswordPs.setClearValue(newPassword); PasswordType passwordType = new PasswordType(); passwordType.setValue(userPasswordPs); ObjectDelta<UserType> delta = prismContext.deltaFor(UserType.class) .item(SchemaConstants.PATH_PASSWORD).add(passwordType) .asObjectDelta(userOid); executeChanges(delta, null, task, result); }
protected void setPassword(PrismObject<UserType> user, String password) { UserType userType = user.asObjectable(); CredentialsType creds = userType.getCredentials(); if (creds == null) { creds = new CredentialsType(); userType.setCredentials(creds); } PasswordType passwordType = creds.getPassword(); if (passwordType == null) { passwordType = new PasswordType(); creds.setPassword(passwordType); } ProtectedStringType ps = new ProtectedStringType(); ps.setClearValue(password); passwordType.setValue(ps); }
CredentialsType credentials = new CredentialsType(); PasswordType pass = new PasswordType(); pass.setValue(ps); credentials.setPassword(pass); shadow.asObjectable().setCredentials(credentials);
userPasswordPs.setClearValue(USER_PASSWORD_1_CLEAR); PasswordType passwordType = new PasswordType(); passwordType.setValue(userPasswordPs);
ProtectedStringType passwordPs = new ProtectedStringType(); passwordPs.setClearValue(USER_SHARPTOOTH_PASSWORD_1_CLEAR); passwordType.setValue(passwordPs); credentialsType.setPassword(passwordType); user.asObjectable().setCredentials(credentialsType);