LibreOffice Module ucbhelper (master) 1
|
This class implements a simple authentication interaction request. More...
#include <simpleauthenticationrequest.hxx>
Public Types | |
enum | EntityType { ENTITY_NA , ENTITY_FIXED , ENTITY_MODIFY } |
Specification whether some entity (realm, username, password, account) is either not applicable at all, has a fixed value, or is modifiable. More... | |
Public Member Functions | |
SimpleAuthenticationRequest (const OUString &rURL, const OUString &rServerName, const OUString &rRealm, const OUString &rUserName, const OUString &rPassword, bool bAllowUseSystemCredentials, bool bAllowSessionStoring=true) | |
Constructor. More... | |
SimpleAuthenticationRequest (const OUString &rURL, const OUString &rServerName, EntityType eRealmType, const OUString &rRealm, EntityType eUserNameType, const OUString &rUserName, EntityType ePasswordType, const OUString &rPassword) | |
Constructor. More... | |
const rtl::Reference< ucbhelper::InteractionSupplyAuthentication > & | getAuthenticationSupplier () const |
This method returns the supplier for the missing authentication data, that, for instance can be used to query the password supplied by the interaction handler. More... | |
Public Member Functions inherited from ucbhelper::InteractionRequest | |
InteractionRequest (const css::uno::Any &rRequest) | |
Constructor. More... | |
void | setContinuations (const css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > &rContinuations) |
This method sets the continuations for the request. More... | |
virtual css::uno::Any SAL_CALL | getRequest () override |
virtual css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > SAL_CALL | getContinuations () override |
rtl::Reference< InteractionContinuation > const & | getSelection () const |
After passing this request to XInteractionHandler::handle, this method returns the continuation that was chosen by the interaction handler. More... | |
void | setSelection (const rtl::Reference< InteractionContinuation > &rxSelection) |
This method sets a continuation for the request. More... | |
Private Member Functions | |
void | initialize (const css::ucb::URLAuthenticationRequest &rRequest, bool bCanSetRealm, bool bCanSetUserName, bool bCanSetPassword, bool bCanSetAccount, bool bAllowUseSystemCredentials, bool bAllowSessionStoring) |
Private Attributes | |
rtl::Reference< ucbhelper::InteractionSupplyAuthentication > | m_xAuthSupplier |
Additional Inherited Members | |
Protected Member Functions inherited from ucbhelper::InteractionRequest | |
void | setRequest (const css::uno::Any &rRequest) |
InteractionRequest () | |
virtual | ~InteractionRequest () override |
This class implements a simple authentication interaction request.
Instances can be passed directly to XInteractionHandler::handle(...). Each instance contains an AuthenticationRequest and three interaction continuations: "Abort", "Retry" and "SupplyAuthentication". The parameters for the AuthenticationRequest and the InteractionSupplyAuthentication objects are partly taken from constructors parameters and partly defaulted as follows:
Read-only values : servername, realm Read-write values: username, password, account All remember-authentication values: RememberAuthentication_NO
Definition at line 52 of file simpleauthenticationrequest.hxx.
Specification whether some entity (realm, username, password, account) is either not applicable at all, has a fixed value, or is modifiable.
Enumerator | |
---|---|
ENTITY_NA | |
ENTITY_FIXED | |
ENTITY_MODIFY |
Definition at line 70 of file simpleauthenticationrequest.hxx.
SimpleAuthenticationRequest::SimpleAuthenticationRequest | ( | const OUString & | rURL, |
const OUString & | rServerName, | ||
const OUString & | rRealm, | ||
const OUString & | rUserName, | ||
const OUString & | rPassword, | ||
bool | bAllowUseSystemCredentials, | ||
bool | bAllowSessionStoring = true |
||
) |
Constructor.
rURL | contains a URL for which authentication is requested. |
rServerName | contains a server name. |
rRealm | contains a realm, if applicable. |
rUserName | contains a username, if available (for instance from a previous try). |
rPassword | contains a password, if available (for instance from a previous try). |
bAllowUseSystemCredentials | specifies if requesting client is able to obtain and use system credentials for authentication |
Definition at line 27 of file simpleauthenticationrequest.cxx.
References initialize().
SimpleAuthenticationRequest::SimpleAuthenticationRequest | ( | const OUString & | rURL, |
const OUString & | rServerName, | ||
EntityType | eRealmType, | ||
const OUString & | rRealm, | ||
EntityType | eUserNameType, | ||
const OUString & | rUserName, | ||
EntityType | ePasswordType, | ||
const OUString & | rPassword | ||
) |
Constructor.
rServerName | contains a server name. |
eRealmType | specifies whether a realm is applicable and modifiable. |
rRealm | contains a realm, if applicable. |
eUserNameType | specifies whether a username is applicable and modifiable. |
rUserName | contains a username, if available (for instance from a previous try). |
ePasswordType | specifies whether a password is applicable and modifiable. |
rPassword | contains a password, if available (for instance from a previous try). |
Definition at line 64 of file simpleauthenticationrequest.cxx.
References ENTITY_MODIFY, ENTITY_NA, and initialize().
|
inline |
This method returns the supplier for the missing authentication data, that, for instance can be used to query the password supplied by the interaction handler.
Definition at line 132 of file simpleauthenticationrequest.hxx.
|
private |
Definition at line 103 of file simpleauthenticationrequest.cxx.
References m_xAuthSupplier, ucbhelper::InteractionRequest::setContinuations(), and ucbhelper::InteractionRequest::setRequest().
Referenced by SimpleAuthenticationRequest().
|
private |
Definition at line 55 of file simpleauthenticationrequest.hxx.
Referenced by initialize().