more Javadocs for StrongboxExternalUsersCacheManager
@@ -22,11 +22,39 @@ import org.springframework.security.core.userdetails.UserDetails;
public interface StrongboxExternalUsersCacheManager
{
+ /**
+ * Searches the user within strongbox users storage. The user can be
+ * internal strongbox user, or external user chached in users storage. <br>
+ *
+ * @param username
+ * the username to search
+ *
+ * @return the {@link User} instance found or null
+ */
User findByUsername(String username);
+ /**
+ * Updates or creates external users which is chaced in strongbox users
+ * storage.<br>
+ * This method call also updates the {@link User#getLastUpdate()} value.
+ *
+ * @param externalSourceId
+ * the identifier of external users provider
+ * @param user
+ * the {@link UserDetails} to be used to update the cached
+ * {@link User}
+ * @return the cached {@link User} instance
+ */
User updateExternalUserDetails(String externalSourceId,
UserDetails user);
+ /**
+ * Deletes stored {@link User} instance from strongbox users storage. This
+ * is commonly needed to invalidate external users cache.
+ *
+ * @param username
+ * the username to search the {@link User} for delete
+ */
void deleteByUsername(String username);
}
