简体   繁体   中英

Secure Web AppBuilder open without prompt login

I created a Web AppBuilder in developer edition.And my featurelayers and webmap are shared with organization in ArcGIS portal.And I am using this secure layers and webmap in my Web AppBuilder. When I download and run my web application in localhost,so being a secure service login prompt open,But rather than using this popup login window how can use token we already have the login token form the integrated .NET Application so how can we skip this popup login page and use token which is given to us through the API, So how can login the Web AppBuilder application using token through the API.

It seems that Arcgis Web Appbuilder will use jimu/tokenUtils to register the token if you pass it through the URL parameter like this:

http://localhost/your_wab_application?token=YOUR_TOKEN_HERE

After that, all request will be sent with the provided token given you access to protected content such as layers or webmaps stored in Arcgis Online (or Portal For Arcgis). You'll have to test, but I think this will probably suppress the login popup from opening.

You can find more details about how this is done in the file jimu.js/ConfigLoader.js in your web appbuilder code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM