Added support for multiple --login url username password entries to osgviewer

This commit is contained in:
Robert Osfield
2017-10-05 15:37:03 +01:00
parent d75564c7e3
commit ddf8c68d26
2 changed files with 11 additions and 8 deletions

View File

@@ -366,6 +366,13 @@ class OSGDB_EXPORT Registry : public osg::Referenced
/** Set the password map to be used by plugins when access files from secure locations.*/
void setAuthenticationMap(AuthenticationMap* authenticationMap) { _authenticationMap = authenticationMap; }
/** Get the password map to be used by plugins when access files from secure locations. Create a AuthenticationMap if one isn't already assigned.*/
AuthenticationMap* getOrCreateAuthenticationMap()
{
if (!_authenticationMap) _authenticationMap = new AuthenticationMap;
return _authenticationMap.get();
}
/** Get the password map to be used by plugins when access files from secure locations.*/
AuthenticationMap* getAuthenticationMap() { return _authenticationMap.get(); }