use of org.apache.jackrabbit.oak.spi.security.user.action.PasswordValidationAction in project jackrabbit-oak by apache.
the class PasswordExpiryHistoryTest method getSecurityConfigParameters.
@Override
protected ConfigurationParameters getSecurityConfigParameters() {
final PasswordValidationAction pwAction = new PasswordValidationAction();
pwAction.init(null, ConfigurationParameters.of(PasswordValidationAction.CONSTRAINT, "^.*(?=.{4,}).*"));
final AuthorizableActionProvider actionProvider = new AuthorizableActionProvider() {
@Nonnull
@Override
public List<? extends AuthorizableAction> getAuthorizableActions(@Nonnull SecurityProvider securityProvider) {
return ImmutableList.of(pwAction);
}
};
ConfigurationParameters userConfig = ConfigurationParameters.of(ImmutableMap.of(UserConstants.PARAM_AUTHORIZABLE_ACTION_PROVIDER, actionProvider, UserConstants.PARAM_PASSWORD_MAX_AGE, 10, UserConstants.PARAM_PASSWORD_HISTORY_SIZE, 10));
return ConfigurationParameters.of(UserConfiguration.NAME, userConfig);
}
Aggregations