1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
3 * This library is open source and may be redistributed and/or modified under
4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5 * (at your option) any later version. The full license is in LICENSE file
6 * included with this distribution, and on the openscenegraph.org website.
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * OpenSceneGraph Public License for more details.
14#ifndef OSGDB_AUTHENTICATIONMAP
15#define OSGDB_AUTHENTICATIONMAP 1
17#include <osg/Referenced>
20#include <osgDB/Export>
29class AuthenticationDetails : public osg::Referenced
33 /** Http authentication techniques, see libcurl docs for details on names and associated functionality.*/
34 enum HttpAuthentication
39 GSSNegotiate = NEGOTIATE,
45 ANYSAFE = ~(BASIC|DIGEST_IE)
48 AuthenticationDetails(const std::string& u, const std::string& p, HttpAuthentication auth=BASIC):
51 httpAuthentication(auth) {}
55 HttpAuthentication httpAuthentication;
58 virtual ~AuthenticationDetails() {}
61class OSGDB_EXPORT AuthenticationMap : public osg::Referenced
65 AuthenticationMap() {}
68 virtual void addAuthenticationDetails(const std::string& path, AuthenticationDetails* details);
70 virtual const AuthenticationDetails* getAuthenticationDetails(const std::string& path) const;
74 virtual ~AuthenticationMap() {}
76 typedef std::map<std::string, osg::ref_ptr<AuthenticationDetails> > AuthenticationDetailsMap;
77 AuthenticationDetailsMap _authenticationMap;
83#endif // OSGDB_AUTHENTICATIONMAP