diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2009-09-17 14:41:33 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2009-09-17 14:41:33 +0000 |
commit | 84a850128d4dc3dc0d9fad53ac611fe3a9832c8f (patch) | |
tree | 9555291299d40db5301db2bd106c3cb5ef8c7d19 /ucbhelper/inc | |
parent | 85d32ee1481d3d0496c113653ed30baefea617d4 (diff) |
CWS-TOOLING: integrate CWS kso32fixes2
2009-09-14 kso #i104767# - 64 bit build breaker
2009-09-14 kso #i14767# - compiler warning
2009-09-08 kso i104767# - Removed obsolete header.
2009-09-08 kso i104767# - Removed obsolete header include.
2009-09-08 kso #i104767# - Fixed build breaker.
2009-09-07 kso #i104767# - merged in dev300 m57.
2009-09-07 kso #i104767# - support for system credentials usage
2009-09-07 kso #i104767# - support for system credentials usage
2009-09-07 kso #i104767# - support for system credentials usage
2009-09-07 kso #i104767# - support for system credentials usage
2009-09-07 kso #i104767# - support for system credentials usage
2009-09-07 Kai Sommerfeld #i104767# - support for system credentials usage
2009-09-07 Kai Sommerfeld #i104767# - support for system credentials usage
2009-09-07 ks93798 #i104767# - adaptions for NTLM SSO
Diffstat (limited to 'ucbhelper/inc')
-rw-r--r-- | ucbhelper/inc/ucbhelper/interactionrequest.hxx | 40 | ||||
-rw-r--r-- | ucbhelper/inc/ucbhelper/simpleauthenticationrequest.hxx | 49 |
2 files changed, 67 insertions, 22 deletions
diff --git a/ucbhelper/inc/ucbhelper/interactionrequest.hxx b/ucbhelper/inc/ucbhelper/interactionrequest.hxx index b66a07caceb7..f23041d0caa2 100644 --- a/ucbhelper/inc/ucbhelper/interactionrequest.hxx +++ b/ucbhelper/inc/ucbhelper/interactionrequest.hxx @@ -38,7 +38,7 @@ #include <com/sun/star/task/XInteractionApprove.hpp> #include <com/sun/star/task/XInteractionDisapprove.hpp> #include <com/sun/star/ucb/XInteractionReplaceExistingData.hpp> -#include <com/sun/star/ucb/XInteractionSupplyAuthentication.hpp> +#include <com/sun/star/ucb/XInteractionSupplyAuthentication2.hpp> #include <com/sun/star/ucb/XInteractionSupplyName.hpp> #include <rtl/ref.hxx> #include <cppuhelper/weak.hxx> @@ -342,7 +342,7 @@ public: class UCBHELPER_DLLPUBLIC InteractionSupplyAuthentication : public InteractionContinuation, public com::sun::star::lang::XTypeProvider, - public com::sun::star::ucb::XInteractionSupplyAuthentication + public com::sun::star::ucb::XInteractionSupplyAuthentication2 { com::sun::star::uno::Sequence< com::sun::star::ucb::RememberAuthentication > m_aRememberPasswordModes; @@ -360,6 +360,9 @@ class UCBHELPER_DLLPUBLIC InteractionSupplyAuthentication : unsigned m_bCanSetUserName : 1; unsigned m_bCanSetPassword : 1; unsigned m_bCanSetAccount : 1; + unsigned m_bCanUseSystemCredentials : 1; + unsigned m_bDefaultUseSystemCredentials : 1; + unsigned m_bUseSystemCredentials : 1; public: /** @@ -382,7 +385,7 @@ public: sal_Bool bCanSetRealm, sal_Bool bCanSetUserName, sal_Bool bCanSetPassword, - sal_Bool bCanSetAccount ); + sal_Bool bCanSetAccount); /** * Constructor. * @@ -408,6 +411,11 @@ public: * @param eDefaultRememberAccountMode specifies the default * authentication-remember-mode for accounts preferred by the * requesting client. + * @param bCanUseSystemCredentials indicates whether issuer of the + * authetication request can obtain and use system credentials + * for authentication. + * @param bDefaultUseSystemCredentials specifies the default system + * credentials usage preferred by the requesting client * * @see com::sun::star::ucb::AuthenticationRequest * @see com::sun::star::ucb::RememberAuthentication @@ -427,7 +435,9 @@ public: com::sun::star::ucb::RememberAuthentication > & rRememberAccountModes, const com::sun::star::ucb::RememberAuthentication - eDefaultRememberAccountMode ); + eDefaultRememberAccountMode, + sal_Bool bCanUseSystemCredentials, + sal_Bool bDefaultUseSystemCredentials ); // XInterface virtual com::sun::star::uno::Any SAL_CALL @@ -497,6 +507,12 @@ public: setRememberAccount( com::sun::star::ucb::RememberAuthentication Remember ) throw( com::sun::star::uno::RuntimeException ); + // XInteractionSupplyAuthentication2 + virtual ::sal_Bool SAL_CALL canUseSystemCredentials( ::sal_Bool& Default ) + throw ( ::com::sun::star::uno::RuntimeException ); + virtual void SAL_CALL setUseSystemCredentials( ::sal_Bool UseSystemCredentials ) + throw ( ::com::sun::star::uno::RuntimeException ); + // Non-interface methods. /** @@ -548,6 +564,8 @@ public: */ const com::sun::star::ucb::RememberAuthentication & getRememberAccountMode() const { return m_eRememberAccountMode; } + + sal_Bool getUseSystemCredentials() const { return m_bUseSystemCredentials; } }; //============================================================================ @@ -571,7 +589,10 @@ inline InteractionSupplyAuthentication::InteractionSupplyAuthentication( m_bCanSetRealm( bCanSetRealm ), m_bCanSetUserName( bCanSetUserName ), m_bCanSetPassword( bCanSetPassword ), - m_bCanSetAccount( bCanSetAccount ) + m_bCanSetAccount( bCanSetAccount ), + m_bCanUseSystemCredentials( sal_False ), + m_bDefaultUseSystemCredentials( sal_False ), + m_bUseSystemCredentials( sal_False ) { m_aRememberPasswordModes[ 0 ] = com::sun::star::ucb::RememberAuthentication_NO; @@ -593,7 +614,9 @@ inline InteractionSupplyAuthentication::InteractionSupplyAuthentication( const com::sun::star::uno::Sequence< com::sun::star::ucb::RememberAuthentication > & rRememberAccountModes, const com::sun::star::ucb::RememberAuthentication - eDefaultRememberAccountMode ) + eDefaultRememberAccountMode, + sal_Bool bCanUseSystemCredentials, + sal_Bool bDefaultUseSystemCredentials ) : InteractionContinuation( pRequest ), m_aRememberPasswordModes( rRememberPasswordModes ), m_aRememberAccountModes( rRememberAccountModes ), @@ -604,7 +627,10 @@ inline InteractionSupplyAuthentication::InteractionSupplyAuthentication( m_bCanSetRealm( bCanSetRealm ), m_bCanSetUserName( bCanSetUserName ), m_bCanSetPassword( bCanSetPassword ), - m_bCanSetAccount( bCanSetAccount ) + m_bCanSetAccount( bCanSetAccount ), + m_bCanUseSystemCredentials( bCanUseSystemCredentials ), + m_bDefaultUseSystemCredentials( bDefaultUseSystemCredentials ), + m_bUseSystemCredentials( bDefaultUseSystemCredentials & bCanUseSystemCredentials ) { } diff --git a/ucbhelper/inc/ucbhelper/simpleauthenticationrequest.hxx b/ucbhelper/inc/ucbhelper/simpleauthenticationrequest.hxx index ddb2e655de8b..13061ca0238f 100644 --- a/ucbhelper/inc/ucbhelper/simpleauthenticationrequest.hxx +++ b/ucbhelper/inc/ucbhelper/simpleauthenticationrequest.hxx @@ -33,9 +33,12 @@ #include <rtl/ref.hxx> #include <ucbhelper/interactionrequest.hxx> -#include <com/sun/star/ucb/AuthenticationRequest.hpp> #include "ucbhelper/ucbhelperdllapi.h" +namespace com { namespace sun { namespace star { namespace ucb { + class URLAuthenticationRequest; +} } } } + namespace ucbhelper { /** @@ -63,12 +66,13 @@ class UCBHELPER_DLLPUBLIC SimpleAuthenticationRequest : public ucbhelper::Intera ucbhelper::InteractionSupplyAuthentication > m_xAuthSupplier; private: - void initialize( ::com::sun::star::ucb::AuthenticationRequest aRequest, - const sal_Bool & bCanSetRealm, - const sal_Bool & bCanSetUserName, - const sal_Bool & bCanSetPassword, - const sal_Bool & bCanSetAccount, - const sal_Bool & bAllowPersistentStoring ); + void initialize( const ::com::sun::star::ucb::URLAuthenticationRequest & rRequest, + sal_Bool bCanSetRealm, + sal_Bool bCanSetUserName, + sal_Bool bCanSetPassword, + sal_Bool bCanSetAccount, + sal_Bool bAllowPersistentStoring, + sal_Bool bAllowUseSystemCredentials ); public: /** Specification whether some entity (realm, username, password, account) @@ -84,6 +88,7 @@ public: /** * Constructor. * + * @param rURL contains a URL for which authentication is requested. * @param rServerName contains a server name. * @param rRealm contains a realm, if applicable. * @param rUserName contains a username, if available (for instance from @@ -92,7 +97,8 @@ public: * a previous try). * @param rAccount contains an account, if applicable. */ - SimpleAuthenticationRequest( const rtl::OUString & rServerName, + SimpleAuthenticationRequest( const rtl::OUString & rURL, + const rtl::OUString & rServerName, const rtl::OUString & rRealm, const rtl::OUString & rUserName, const rtl::OUString & rPassword, @@ -102,6 +108,7 @@ public: /** * Constructor. * + * @param rURL contains a URL for which authentication is requested. * @param rServerName contains a server name. * @param rRealm contains a realm, if applicable. * @param rUserName contains a username, if available (for instance from @@ -109,14 +116,19 @@ public: * @param rPassword contains a password, if available (for instance from * a previous try). * @param rAccount contains an account, if applicable. - * @param bAllowPersistentStoring specifies if the credentials should stored in the passowrd container persistently + * @param bAllowPersistentStoring specifies if the credentials should + * be stored in the passowrd container persistently + * @param bAllowUseSystemCredntials specifies if requesting client is + * able to obtain and use system credentials for authentication */ - SimpleAuthenticationRequest( const rtl::OUString & rServerName, + SimpleAuthenticationRequest( const rtl::OUString & rURL, + const rtl::OUString & rServerName, const rtl::OUString & rRealm, const rtl::OUString & rUserName, const rtl::OUString & rPassword, const rtl::OUString & rAccount, - const sal_Bool & bAllowPersistentStoring); + sal_Bool bAllowPersistentStoring, + sal_Bool bAllowUseSystemCredentials ); /** @@ -138,7 +150,8 @@ public: modifiable. * @param rAccount contains an account, if applicable. */ - SimpleAuthenticationRequest( const rtl::OUString & rServerName, + SimpleAuthenticationRequest( const rtl::OUString & rURL, + const rtl::OUString & rServerName, EntityType eRealmType, const rtl::OUString & rRealm, EntityType eUserNameType, @@ -152,6 +165,7 @@ public: /** * Constructor. * + * @param rURL contains a URL for which authentication is requested. * @param rServerName contains a server name. * @param eRealmType specifies whether a realm is applicable and modifiable. @@ -167,9 +181,13 @@ public: * @param eAccountType specifies whether an account is applicable and modifiable. * @param rAccount contains an account, if applicable. - * @param bAllowPersistentStoring specifies if the credentials should stored in the passowrd container persistently + * @param bAllowPersistentStoring specifies if the credentials should + * be stored in the passowrd container persistently + * @param bAllowUseSystemCredntials specifies if requesting client is + * able to obtain and use system credentials for authentication */ - SimpleAuthenticationRequest( const rtl::OUString & rServerName, + SimpleAuthenticationRequest( const rtl::OUString & rURL, + const rtl::OUString & rServerName, EntityType eRealmType, const rtl::OUString & rRealm, EntityType eUserNameType, @@ -178,7 +196,8 @@ public: const rtl::OUString & rPassword, EntityType eAccountType, const rtl::OUString & rAccount, - const sal_Bool & bAllowPersistentStoring); + sal_Bool bAllowPersistentStoring, + sal_Bool bAllowUseSystemCredentials ); /** * This method returns the supplier for the missing authentication data, |