From 907f2a6ed1019cc8d86aec0f7f5d934845baed02 Mon Sep 17 00:00:00 2001 From: David Caruana Date: Mon, 16 Jan 2006 15:41:44 +0000 Subject: [PATCH] Add authenticate call git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2115 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../java/org/alfresco/example/SimpleExampleWithContent.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/java/org/alfresco/example/SimpleExampleWithContent.java b/source/java/org/alfresco/example/SimpleExampleWithContent.java index 5025e3ed7b..63c027759b 100644 --- a/source/java/org/alfresco/example/SimpleExampleWithContent.java +++ b/source/java/org/alfresco/example/SimpleExampleWithContent.java @@ -33,6 +33,7 @@ import org.alfresco.service.cmr.repository.ContentWriter; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.cmr.repository.NodeService; import org.alfresco.service.cmr.repository.StoreRef; +import org.alfresco.service.cmr.security.AuthenticationService; import org.alfresco.service.namespace.QName; import org.alfresco.service.transaction.TransactionService; import org.alfresco.util.ApplicationContextHelper; @@ -97,6 +98,10 @@ public class SimpleExampleWithContent // get individual, required services NodeService nodeService = serviceRegistry.getNodeService(); ContentService contentService = serviceRegistry.getContentService(); + + // authenticate + AuthenticationService authenticationService = serviceRegistry.getAuthenticationService(); + authenticationService.authenticate("admin", "admin".toCharArray()); // create a store, if one doesn't exist StoreRef storeRef = new StoreRef(