finos / symphony-bdk-java

The Symphony BDK (Bot Developer Kit) for Java helps you to create production-grade Chat Bots and Extension Applications on top of the Symphony REST APIs.
https://symphony-bdk-java.finos.org
Apache License 2.0
23 stars 69 forks source link

How to call logout from SymphonyBdk #389

Closed hkw1831 closed 3 years ago

hkw1831 commented 3 years ago

Hello, I am not sure is it good to post question here.

I would like to know is is it possible to call logout from SymphonyBdk class?

I found we can call logout from ISymAuth, but seems I cannot find any linkage between SymphonyBdk with ISymAuth.

Thank you very much.

symphony-youri commented 3 years ago

Hello @hkw1831,

This is the right place to ask questions so everyone can benefit from it!

Indeed in the legacy BDK ISymAuth had a logout() method that does not exist anymore in the BDK 2.0 (still in BETA), i.e in SymphonyBdk. May I ask what was your use case to use the logout() method? Usually bots tend to login, to refresh their authentication but never log out.

hkw1831 commented 3 years ago

Hello @symphony-youri,

Thanks for your prompt response.

Our platform connecting to symphony shuts down every weekend. Therefore I am thinking is it better to logout when we don't need to connect it (i.e. when shut down the platform).

If it is fine to not logout before login again, then I think we don't need to call logout anymore.

symphony-youri commented 3 years ago

Are you using RSA authentication or certificate authentication (i.e botPrivateKeyPath vs botCertPath in the configuration)?

If you are using RSA then the logout is actually not doing anything, if you are using certificate I would recommend to use RSA (https://developers.symphony.com/symphony-developer/docs/authentication).

But it should be fine not to perform the logout anymore, login again would work anyway.

hkw1831 commented 3 years ago

I am using certificate authentication currently, as the authentication method is provided by our client.

If it is fine not to logout anymore, then I will not logout in this scenario.

Thank you very much :)