cancel
Showing results for 
Search instead for 
Did you mean: 

how can we use the java api login?

yvanme
Champ in-the-making
Champ in-the-making

how can we use the java api login?

10 REPLIES 10

romschn
Star Collaborator
Star Collaborator

Could you please elaborate what exactly you are looking for? Do you mean to invoke login web script through Java code?

yvanme
Champ in-the-making
Champ in-the-making

according to the architecture ,above the repo,it has the public java api ,the rest api is based on it,how can we use it to  authenticate

romschn
Star Collaborator
Star Collaborator

What is the use case that you are trying to achieve? Do you have a different front-end system and are you using Alfresco just as a backend repository and you want to connect your front-end to backend alfresco repository?

yvanme
Champ in-the-making
Champ in-the-making

Yes! I want to do this

romschn
Star Collaborator
Star Collaborator

Okay, in that case you can use the out-of-the-box login web script and invoke it from your front-end passing in the required parameters to it.

Take a look at Listing pre-built web scripts | Alfresco Documentation to get to know the available web scripts in Alfresco, from there you should be able to find the login web script.

Let me know if you face any issue for it.

Hope this helps.

kaynezhang
World-Class Innovator
World-Class Innovator

The public api is an Embedded API , it is used to develop extensions to the Alfresco content application server,create new services in Alfresco, or write customizations  .
For example you want to implement a web script, you need other public java api, even so you still don't need login public java API。
So generally you don't need login public java API.

afaust
Legendary Innovator
Legendary Innovator

You need to be a bit more careful with the naming here since Alfresco unfortunately has created a bit of a mess with naming the APIs.

Java Service API - the embedded Java service-level API used in extensions that integrated directly in the Alfresco Repository, which includes the AuthenticationService for performing login

Public API - the aggregate ReST + CMIS API that can be consumed by external applications to access Alfresco, including initial login/authentication

Cloud Public API - a slightly extended variant of the Public API for talking to the Alfresco Cloud service including an OAuth2 authentication scheme

If you create an extension to the Alfresco Repository and use the Java Service APIs you typically do not need call any authentication because the Repository should already authenticate the user (provided custom web scripts / endpoints aren't explicitly configured to be consumed anonymously). In all other cases you need authentication and should consult the corresponding documentation.

yvanme
Champ in-the-making
Champ in-the-making

I see ,Thank you very much.

yvanme
Champ in-the-making
Champ in-the-making

I see,Thank you very much