cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting to an Alfresco in the Cloud repo

vsams14
Champ in-the-making
Champ in-the-making
I'm not sure if this is in the right section, so if an admin could move it to wherever it should be, that would be great.

Our company has decided that we will be using Alfresco in the Cloud as our repository system, and I have been tasked with creating a cmis client to connect to this repository. With a locally/server run alfresco instance, it seems easy enough to connect to the repo via an AtomPub binding, providing url, username, and password. However, with Alfresco Cloud, the only way I have seen to be able to connect to the repo is by linking the app to a dev account and getting an oauth2 token.

Since multiple users would be using this app, would each of them have to create a dev account and link the app and get authentication tokens, because that seems like a very difficult way of doing things. Is there any way I can have the client connect to the necessary repository given just username and password?

Thanks
2 REPLIES 2

jpotts
World-Class Innovator
World-Class Innovator
If you are trying to have a single account be the proxy account for your app that isn't going to work. We use OAuth2 for all API connections to Alfresco in the Cloud. But that doesn't mean that multiple users cannot use your app. You only need one API key and secret. Configure those in your app. Then, when your users use your app, they will grant your app access to their Alfresco account. You can persist that access token and the refresh token in your app and they'll never have to do the grant again assuming you use the tokens properly.

Does that make sense?

Jeff

vsams14
Champ in-the-making
Champ in-the-making
I think I understand.
Once the user logs in with their credentials, it will authorise the app because of the secret and key. It will send an oauth2 token and refresh token back to the app to be used/stored/whatever. The expiration time on an oauth2 token is very short as I have noticed.

Would it make sense for the app to refresh the token while it's running, but if it's shut down to have the user re-login, since the token will have likely run out by then (assuming someone shuts down their computer for the night and turns it back on the next morning, the token will be expired)

I haven't actually tried refreshing a token yet, I've just been requesting new ones. When the refresh token is called, does it allow for continued use of the original token, or does it just issue a new one?

And to answer your first question (I'm sorry for the inconsistent order), no, we don't want to use a single account as a proxy. If anything, we would like to avoid that. I was just confused because my dev account automatically linked to our repo without me doing anything (Maybe because it was the same email address?), so I thought each user of our app would have to create a dev account and link the app to it to be able to get certificates. If people are able to get certificates issued to the app just by having a regular alfresco account, that's great.

If I have any more questions, I'll be sure to ask you. Thanks for all the help thus far!
Val Samsonov