Class PasswordValidationAction
- java.lang.Object
-
- org.apache.jackrabbit.oak.spi.security.user.action.AbstractAuthorizableAction
-
- org.apache.jackrabbit.oak.spi.security.user.action.PasswordValidationAction
-
- All Implemented Interfaces:
AuthorizableAction
public class PasswordValidationAction extends AbstractAuthorizableAction
PasswordValidationActionprovides a simple password validation mechanism with the following configurable option:- constraint: a regular expression that can be compiled
to a
Patterndefining validation rules for a password.
The password validation is executed on user creation and upon password change. It throws a
ConstraintViolationExceptionif the password validation fails.
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONSTRAINT
-
Constructor Summary
Constructors Constructor Description PasswordValidationAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinit(@NotNull SecurityProvider securityProvider, @NotNull ConfigurationParameters config)Doesn't perform any action.voidonCreate(@NotNull User user, @Nullable String password, @NotNull Root root, @NotNull NamePathMapper namePathMapper)Doesn't perform any action.voidonPasswordChange(@NotNull User user, @Nullable String newPassword, @NotNull Root root, @NotNull NamePathMapper namePathMapper)Doesn't perform any action.-
Methods inherited from class org.apache.jackrabbit.oak.spi.security.user.action.AbstractAuthorizableAction
onCreate, onRemove
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.jackrabbit.oak.spi.security.user.action.AuthorizableAction
onCreate
-
-
-
-
Field Detail
-
CONSTRAINT
public static final String CONSTRAINT
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(@NotNull @NotNull SecurityProvider securityProvider, @NotNull @NotNull ConfigurationParameters config)Description copied from class:AbstractAuthorizableActionDoesn't perform any action.- Specified by:
initin interfaceAuthorizableAction- Overrides:
initin classAbstractAuthorizableAction- Parameters:
securityProvider- The security provider present with the repositoryconfig- The configuration parameters for this action.
-
onCreate
public void onCreate(@NotNull @NotNull User user, @Nullable @Nullable String password, @NotNull @NotNull Root root, @NotNull @NotNull NamePathMapper namePathMapper) throws RepositoryExceptionDescription copied from class:AbstractAuthorizableActionDoesn't perform any action.- Specified by:
onCreatein interfaceAuthorizableAction- Overrides:
onCreatein classAbstractAuthorizableAction- Parameters:
user- The new user that has not yet been persisted; e.g. the associated tree is still 'NEW'.password- The password that was specified upon user creation.root- The root associated with the user manager.- Throws:
RepositoryException- If an error occurs.
-
onPasswordChange
public void onPasswordChange(@NotNull @NotNull User user, @Nullable @Nullable String newPassword, @NotNull @NotNull Root root, @NotNull @NotNull NamePathMapper namePathMapper) throws RepositoryExceptionDescription copied from class:AbstractAuthorizableActionDoesn't perform any action.- Specified by:
onPasswordChangein interfaceAuthorizableAction- Overrides:
onPasswordChangein classAbstractAuthorizableAction- Parameters:
user- The user that whose password is going to change.newPassword- The new password as specified inUser.changePassword(java.lang.String)root- The root associated with the user manager.- Throws:
RepositoryException- If an exception or error occurs.
-
-