In this post under Java LDAP, I will show with example how to modify an existing attribute of an ldap entry. For our example I will modify the “description” attribute of an ldap entry identified by dn. I will show two approaches through which we can modify the attribute of an ldap entry. Below is…… Continue reading Modifying an existing attribute of a ldap entry
Ordering Application Event listener
In my previous post under Spring Core, I showed you guys, how to listed to application events, how to create and publish our own application event, and how to associate multiple event listeners to one particular event. In this post under Spring Core, I will show with example how to order multiple application event listener…… Continue reading Ordering Application Event listener
Checking whether password contains username or not
In this post under Passay, I will show with example the purpose and how to use “UsernameRule” class. When a user register on a website they come up with username and password. They tend to create a password that is easy to remember for example using DOB as password, nick name as password etc. Sometimes…… Continue reading Checking whether password contains username or not
Chaining multiple application event listener
In previous post under Spring Core, I showed1) how to listen for events generated from application context2) how to generate and listen for custom application event. In this post, I will show with example how to chain multiple event listener for a particular application event For our example, I will take “ContextStoppedEvent” event which is…… Continue reading Chaining multiple application event listener
Deleting an LDAP entry
In this post under Java LDAP, I will explain how to delete an LDAP entry. The below figure shows the LDAP DIT (Directory Information Tree) I will show two approaches to delete an ldap entry or sub context. In the first approach we will delete the ldap entry with dn “cn=user3,ou=dev,dc=example,dc=org”. In the second approach…… Continue reading Deleting an LDAP entry
Creating a new entry in ldap
In this post under Java LDAP, I will show how to create a sub context with an example In LDAP, sub context means a new LDAP entry under another existing LDAP entry or context. Below is the screenshot of LDAP DIT (Directory Information Tree) I will show two approaches that can be used to create…… Continue reading Creating a new entry in ldap
Generating Custom application events
In this post under Spring Core, I will show with example how to create custom application events. For our example, I created a custom event that the application will generate as shown below CustomEvent package package32; import org.springframework.context.ApplicationEvent; public class CustomEvent extends ApplicationEvent { public CustomEvent(Object source) { super(source); } } In the above code,…… Continue reading Generating Custom application events
IllegalCharacterRule example
In this post under Passay, I will explain with example the purpose and how to use “IllegalCharacterRule” class. In the previous, I explained the purpose of “AllowedCharacterRule” class. The class “IllegalCharacterRule” is the opposite of “AllowedCharacterRule”. In “AllowedCharacterRule” we create an array of characters that should be allowed in the password text. In other words…… Continue reading IllegalCharacterRule example
AllowedCharacterRule example
In this post under Passay, I will explain with example the purpose and how to use “AllowedCharacterRule” class. When we ask a user to come up with a password, we can restrict them to use only those characters that are whitelisted by us. In that case, we can have rule with the help of Passay’s…… Continue reading AllowedCharacterRule example
Retrieving attribute of an ldap entry
In this post under Java LDAP, I will show with example how to retrieve an attribute of an existing ldap entry. For our example we will take the below ldap entry. Please note in the above screenshot, all the attributes have only one value except attribute “telephoneNumber” which has 2 values. Below is the complete…… Continue reading Retrieving attribute of an ldap entry