问题
I am creating a dashboard which uses a few iframes to bring in Solarwinds data. The problem righ now is that, everytime I load the iframe I have to type in the username and password and manually login.
Is there a way to do this by passing userid and password into the URL. The URL that my iframe calls to load the Solarwinds data is:
"http://myserver/Orion/DetachResource.aspx?ResourceID=XXXX&NetObject="
Note: xxxx = a 4 digit Resource ID
回答1:
Yes, this is possible, but it will expose the password to anyone who views your dashboard since it will be right there in the source code as well as anyone watching network traffic or able to poke around the browser cache. If this is not something you are concerned about in your environment, you can include the credentials in the URL with the AccountID and Password query string parameters. Like this:
http://myserver/Orion/DetachResource.aspx?ResourceID=XXXX&NetObject=&AccountID=guest&Password=NotASecretAnymore
来源:https://stackoverflow.com/questions/18242023/automatically-authenticate-into-solarwinds-and-view-data-using-a-url