I am really just trying to confirm my understanding here. I want to restrict access to a service to specific roles in Server Manager. I then want to embed that service in a web application. If I do that, will users be prompted to provide a username and password automatically when they try to load that page or will I need to build a mechanism for them to provide it?
If your application is using a secured map service, the user will be prompted for a user name and password automatically.
-Steven
Adam,
If you are building an application using the JS API, you will need to reference the IdentityManager. It will present a login dialog when attempting to use a secured service.
IdentityManager | API Reference | ArcGIS API for JavaScript
Regards,
Tom
I don't add that module and it still prompts me for a user name/password. We are using token based authentication.
-Steven
You can also look into using a proxy page:
Using the proxy | Guide | ArcGIS API for JavaScript
Use proxy—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers
You can embed the valid credentials within the proxy page so that users won't be prompted to login to the application to access the secure service.