Page 1 of 1
Need to open a browser for SSO login in oxygen
Posted: Thu Mar 04, 2021 9:27 am
by tarinisunil
Hi,
We create a plugin which works with oxygen & CMS. We have a specific requirement to open a browser for SSO login for the user to login into a specific CMS for access. Earlier we did this with JavaFX WebView but due to some issues it is not opening in windows correctly. It works fine in Mac. Is it possible to open the default system browser and get the cookies from that in oxygen? or is there an integration available to embed a native browser in Oxygen so that we can ask the user to login and get the cookies from there
Thanks
Regards
Tarini
Re: Need to open a browser for SSO login in oxygen
Posted: Thu Mar 04, 2021 1:09 pm
by Gabriel Titerlea
Hello,
Is it possible to open the default system browser and get the cookies from that in oxygen?
It's not possible. I'll describe how we share the authentication from the browser with Oxygen Editor in our
Content Fusion product:
Code: Select all
┌────────┐ ┌─────┐ ┌─────────┐
│ │ │ │ │ │
│ Plugin │ │ CMS │ │ Browser │
│ │ │ │ │ │
└───┬────┘ └──┬──┘ └────┬────┘
│ │ │
│ /authorize │ │
├───────────────────────────────────────────►│ │
│ │ │
│ │ │
│ authCode + checkAuthCode │ │
│◄───────────────────────────────────────────┤ │
│ │ │
│ │ │
│ /auth?auth=authCode (*) │
├────────────────────────────────────────────┬───┬─────────────────────────────┬─►├┐
│ │ │ User presses a button to │ ││
│ │ │ grant your plugin access to │ ││
│ /checkAuth?auth=checkAuthCode │ │ his/her account. │ ││
├────────┬───────────────────────────┬──────►├┐ └─────────────────────────────┘ ││
│ │ The CMS keeps the request │ ││ ││
│ │ open until it receives a │ ││ ││
│ │ grant access request from │ ││ ││
│ │ the browser (*) │ ││ ││
│ └───────────────────────────┘ │◄───────────────────────────────────┼┘
│ ││ │
│ ││ │
│ ││ │
│ accessToken ││ │
│◄───────────────────────────────────────────┼┘ │
│ │ │
│ │ │
│ │ │
│ use accessToken to authorize requests │ │
├───────────────────────────────────────────►│ │
│ │ │
You can also read about
GitHub's device flow that describes a similar authentication process. Or you could implement
OAuth 2.0 for Native Apps.
Best,
Gabriel
Re: Need to open a browser for SSO login in oxygen
Posted: Wed Mar 10, 2021 11:19 am
by tarinisunil
Hello ,
I had one more query, is it possible to have a plugin which is a mix of java and javascript? Like the main plugin is maven based but a small part of it is javascript based.
Is there any sample documentation around it
Thanks
Regards
Tarini
Re: Need to open a browser for SSO login in oxygen
Posted: Wed Mar 10, 2021 7:48 pm
by cristi_talau
Hello,
Yes. A plugin can have both Java and JavaScript extensions [1].
Best,
Cristian
[1]
https://www.oxygenxml.com/doc/versions/ ... in-js.html