Hi Shazni,

> I get the point of why we shouldn't be using the redirection and instead
> use the underlying REST API, which is needed as rightly mentioned by
> Thilini for seamless switching. Just for curiosity, when switching between
> the environments we still have to make whatever the REST calls every time
> to get the updated values of the respective environments details right?
>

Yes, When a user switch to an enviroments, We create an instance of
swagger-client[2] specific to that selected enviroment an instance is not
available already for that enviroment. Swagger-client is used to make REST
API calls from the browser. For an example, If user was in API Listing page
and he changed the enviroment to new one, We will change the swagger-client
instance to newly selected enviroment and there after all the REST API
calls made to that enviroment are same.


> Also when the token expires for a given environment, the user will be
> redirected back to the login page right?
>

Yes, If the token is expired the user will be redirect[1](Not HTTP
redirect) to the login page.

In this case say the user is logged into another environment and the token
> is still valid for that environment how have we planned to switch to that
> environment, should the user chose to switch to that while on login page of
> the first? Do we plan to provide links to other environments in the login
> page it self?
>

We list the available environments in the login page. But from the login
page, users can't switch to an environment, even though they have a valid
token for that environment.

[1]:
https://github.com/wso2/carbon-apimgt/blob/master/features/apimgt/org.wso2.carbon.apimgt.publisher.feature/src/main/resources/publisher/source/src/App.js#L74
[2]: https://github.com/swagger-api/swagger-js
-- 
*Kasun Thennakoon*
Software Engineer
WSO2, Inc.
Mobile:+94 711661919
_______________________________________________
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to