AuthenticationMap
Go to the documentation of this file.
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
#ifndef OSGDB_AUTHENTICATIONMAP
#define OSGDB_AUTHENTICATIONMAP 1
#include <osg/Referenced>
#include <osg/ref_ptr>
#include <osgDB/Export>
#include <string>
#include <map>
namespace osgDB {
class Archive;
class AuthenticationDetails : public osg::Referenced
{
public:
enum HttpAuthentication
{
BASIC = 1<<0,
DIGEST = 1<<1,
NEGOTIATE = 1<<2,
GSSNegotiate = NEGOTIATE,
NTLM = 1<<3,
DIGEST_IE = 1<<4,
NTLM_WB = 1<<5,
ONLY = 1<<31,
ANY = ~(DIGEST_IE),
ANYSAFE = ~(BASIC|DIGEST_IE)
};
AuthenticationDetails(const std::string& u, const std::string& p, HttpAuthentication auth=BASIC):
username(u),
password(p),
httpAuthentication(auth) {}
std::string username;
std::string password;
HttpAuthentication httpAuthentication;
protected:
virtual ~AuthenticationDetails() {}
};
class OSGDB_EXPORT AuthenticationMap : public osg::Referenced
{
public:
AuthenticationMap() {}
virtual void addAuthenticationDetails(const std::string& path, AuthenticationDetails* details);
virtual const AuthenticationDetails* getAuthenticationDetails(const std::string& path) const;
protected:
virtual ~AuthenticationMap() {}
typedef std::map<std::string, osg::ref_ptr<AuthenticationDetails> > AuthenticationDetailsMap;
AuthenticationDetailsMap _authenticationMap;
};
}
#endif // OSGDB_AUTHENTICATIONMAP
Referenced
osgDB::AuthenticationDetails
Definition AuthenticationMap:30
osgDB::AuthenticationDetails::AuthenticationDetails
AuthenticationDetails(const std::string &u, const std::string &p, HttpAuthentication auth=BASIC)
Definition AuthenticationMap:48
osgDB::AuthenticationDetails::~AuthenticationDetails
virtual ~AuthenticationDetails()
Definition AuthenticationMap:58
osgDB::AuthenticationDetails::httpAuthentication
HttpAuthentication httpAuthentication
Definition AuthenticationMap:55
osgDB::AuthenticationDetails::password
std::string password
Definition AuthenticationMap:54
osgDB::AuthenticationDetails::username
std::string username
Definition AuthenticationMap:53
osgDB::AuthenticationDetails::HttpAuthentication
HttpAuthentication
Definition AuthenticationMap:35
osgDB::AuthenticationDetails::ANY
@ ANY
Definition AuthenticationMap:44
osgDB::AuthenticationDetails::ANYSAFE
@ ANYSAFE
Definition AuthenticationMap:45
osgDB::AuthenticationDetails::ONLY
@ ONLY
Definition AuthenticationMap:43
osgDB::AuthenticationDetails::DIGEST
@ DIGEST
Definition AuthenticationMap:37
osgDB::AuthenticationDetails::BASIC
@ BASIC
Definition AuthenticationMap:36
osgDB::AuthenticationDetails::NEGOTIATE
@ NEGOTIATE
Definition AuthenticationMap:38
osgDB::AuthenticationDetails::DIGEST_IE
@ DIGEST_IE
Definition AuthenticationMap:41
osgDB::AuthenticationDetails::NTLM_WB
@ NTLM_WB
Definition AuthenticationMap:42
osgDB::AuthenticationDetails::GSSNegotiate
@ GSSNegotiate
Definition AuthenticationMap:39
osgDB::AuthenticationDetails::NTLM
@ NTLM
Definition AuthenticationMap:40
osgDB::AuthenticationMap::AuthenticationDetailsMap
std::map< std::string, osg::ref_ptr< AuthenticationDetails > > AuthenticationDetailsMap
Definition AuthenticationMap:76
osgDB::AuthenticationMap::addAuthenticationDetails
virtual void addAuthenticationDetails(const std::string &path, AuthenticationDetails *details)
osgDB::AuthenticationMap::AuthenticationMap
AuthenticationMap()
Definition AuthenticationMap:65
osgDB::AuthenticationMap::getAuthenticationDetails
virtual const AuthenticationDetails * getAuthenticationDetails(const std::string &path) const
osgDB::AuthenticationMap::~AuthenticationMap
virtual ~AuthenticationMap()
Definition AuthenticationMap:74
osgDB::AuthenticationMap::_authenticationMap
AuthenticationDetailsMap _authenticationMap
Definition AuthenticationMap:77
osg::Referenced
Definition Referenced:44
osgDB
Definition Archive:24
Export
OSGDB_EXPORT
#define OSGDB_EXPORT
Definition osgDB/Export:39
ref_ptr