On Sat, Jun 29, 2019 at 5:42 AM Manoj Patil <[email protected]> wrote:

> ok i see this request. but another one is when i am click on logout then
> login page “index.html”  nor reloaded from server is load from localy . is
> it possible to reload every time after i am click on guacamole logout.
> because i write a my own small script in index.html and this script is
> validate when index.html is reload or press ctrl+f5, when i am logout from
> guacamole then link not reload from server it loaded from localy so please
> suggest me how i do this.
>
>
A couple of things:
- You mentioned that there is a POST 403 error when the page is loading.
This is normal and expected - it is how the login page is triggered - the
web application loads in the browser and attempts to access the REST API on
the server, and the server sends a 403 error that tells the web application
to display the login page, and what it should display on the login page.
If you look in the Network tab of the browser console, and examine that 403
error response, you will see that the body of it contains information on
what credentials should be displayed.  This is used throughout the login
process - if additional credentials are required (like a second factor)
then further 403 errors will be generated with those requirements.

- I think you're misunderstanding how the Guacamole Client web application
works.  From a traditional browser point of view, the web application does
not load or reload HTML pages after the initial index.html is loaded.  All
of the changes in displays on the page are done using JavaScript
(AngularJS, specifically), and are loaded and changed dynamically as the
user interacts with that page and the page makes calls to the REST API.  It
is specifically designed so that the index.html page will not reload or
move to another HTML page.  The only exceptions to that are when using
certain authentication providers, particularly SSO ones, where you must
redirect away from the page for the authentication and then return.  (I
think I'm representing this aspect correctly - Mike can respond with any
tweaks to that if I'm wrong.)

- If you want some JavaScript code to run during logout, or every time the
login page is displayed, then you should work with the design of the web
application, and use an AngularJS method to make that happen.  It's still
unclear what you're trying to do with the extra code at the login page, but
off the top of my head I would say you could use a $watch directive from
AngularJS to look for certain events that get broadcast at logout or login
and trigger actions based on those events.  If you're willing to share with
us more detail on what you're trying to do, we can help guide you, but it
sounds to me like you're trying to fight against the design of the web
application rather than work through the flow of it.

-Nick

Reply via email to