0

I need current login and username in Alfresco to construct org.apache.chemistry.opencmis.client.api.Session instance as described here https://docs.alfresco.com/6.1/concepts/opencmis-ext-intro.html but I don't know how to do that, could you tell me? My aim to get more than 1000 records from the repository using CMIS request and since I can not change the configuration I need use paging with org.apache.chemistry.opencmis.client.api.Session instance as described here https://issues.alfresco.com/jira/browse/MNT-15540 and here https://stackoverflow.com/a/21127909 Please, help me to get more than 1000 documents with single CMIS query? Thank you!

  • Generally you shouldn't be getting the password, you'd get username and token then send the token correctly formatted instead of the password to authenticate – Gagravarr Sep 27 '20 at 18:50
  • Gagravarr please take a look at https://docs.alfresco.com/6.1/concepts/opencmis-ext-intro.html – Ekaterina Ivanova iceja.net Sep 28 '20 at 12:30
  • Doesn't change the fact that if you have an already logged-in user, you normally want to get a token for them, not try to dig out their password. You only want to ask for a password if you're standalone – Gagravarr Sep 28 '20 at 13:58

2 Answers2

0

You can't get the password but you can retrieve the username and authenticate with the alf token.

Java API: PersonService

getPerson @Auditable(parameters="personRef") PersonService.PersonInfo getPerson(NodeRef personRef) throws NoSuchPersonException Retrieve the person info for an existing person NodeRef Parameters: personRef - NodeRef Returns: PersonInfo (username, firstname, lastname) Throws: NoSuchPersonException - if the person doesn't exist

Arjun
  • 624
  • 2
  • 6
0

If you fetch the user's ticket, which you can do in a variety of ways, including the public REST API or your own custom web script, you can then use the ticket as the password when creating a CMIS session using OpenCMIS. This is the proper way to authenticate with CMIS when you don't know the user's password.

Jeff Potts
  • 10,468
  • 17
  • 40