The method createAuthentication(String, char[]) is undefined
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2010 01:44 AM
Hi All,
I am using Alfresco-Community-3.3 and am trying out the following example code from Jeff Potts Alfresco Developer Guide:
But I get this error:
And indeed when I look at the javadocs for org.alfresco.service.cmr.security.AuthenticationService there is no createAuthentication() method. It seems to have been moved into org.alfresco.service.cmr.security.MutableAuthenticationService. So, I changed authenticationService into a MutableAuthenticationService:
You also need to modify the signature of setAuthenticationService().
Rob
I am using Alfresco-Community-3.3 and am trying out the following example code from Jeff Potts Alfresco Developer Guide:
// client-extensions/src/java/com/someco/module/BootstrapAuthorityCreator.java// create tuser1, tuser2, tuser3, tuser4if(!authenticationService.authenticationExists("tuser1")) { authenticationService.createAuthentication("tuser1", "password".toCharArray()); if (logger.isDebugEnabled()) logger.debug("Created tuser1 auth");}
But I get this error:
The method createAuthentication(String, char[]) is undefined for the type AuthenticationService
And indeed when I look at the javadocs for org.alfresco.service.cmr.security.AuthenticationService there is no createAuthentication() method. It seems to have been moved into org.alfresco.service.cmr.security.MutableAuthenticationService. So, I changed authenticationService into a MutableAuthenticationService:
// private AuthenticationService authenticationService; private MutableAuthenticationService authenticationService;
You also need to modify the signature of setAuthenticationService().
Rob

Labels:
- Labels:
-
Archive
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2010 08:00 AM
Thank you very much for posting this 
I'm just getting in to developing for Alfresco and with Java (I have C# development background) and this was most helpful in getting me off the ground.

I'm just getting in to developing for Alfresco and with Java (I have C# development background) and this was most helpful in getting me off the ground.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2010 09:40 PM
You're welcome. 
Rob

Rob

