How to call Alfresco Rest API's using OAuth instead of using Basic Auth?

cancel
Showing results for 
Search instead for 
Did you mean: 
talape_deepak
Member II

How to call Alfresco Rest API's using OAuth instead of using Basic Auth?

I have to integrate my external application with Alfresco using Alfresco Rest API's, Where I have to call these API's from my custom java microservices using OAuth/OAuth 2.0 instead of using Basic Auth. (There is a separate service account in AD which I have to use for calling ACS rest API's)
 
Please let me know, how can I get the Auth Tokens for my service account user, so I can pass those tokens while calling rest API.

 

Alfresco Version: Alfresco Content Service 6.2.2 (Enterprise Edition)

3 Replies
ilseva
Active Member

Re: How to call Alfresco Rest API's using OAuth instead of using Basic Auth?

talape_deepak
Member II

Re: How to call Alfresco Rest API's using OAuth instead of using Basic Auth?

@ilseva Thanks for the quick response.

Actually, we have already configured the identity service with keycloak, and all the AD user's are able to login to ACS Share using SSO.

But, I am not understanding which URL's I have to use for getting auth token before calling the ACS rest API from external application. 

Can you please share the API urls to get the auth token and the sequence in which I have to call them before calling Actual Alfresco API. 

If possible, please share the exact url which i can use from postman to get auth token's and later I can use those auth tokens to call Alfresco API.

Any suggestions or inputs will be really appreciated.

 

Thanks in Advance.

ilseva
Active Member

Re: How to call Alfresco Rest API's using OAuth instead of using Basic Auth?

I think that the URL you have to call to obtain the token has nothing to do with alfresco.

You have to use Keycloak API: https://www.keycloak.org/docs/latest/authorization_services/#_service_overview