LibreOffice Module ucbhelper (master) 1
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
ucbhelper::SimpleAuthenticationRequest Class Referencefinal

This class implements a simple authentication interaction request. More...

#include <simpleauthenticationrequest.hxx>

Inheritance diagram for ucbhelper::SimpleAuthenticationRequest:
[legend]
Collaboration diagram for ucbhelper::SimpleAuthenticationRequest:
[legend]

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::InteractionSupplyAuthenticationm_xAuthSupplier
 

Additional Inherited Members

- Protected Member Functions inherited from ucbhelper::InteractionRequest
void setRequest (const css::uno::Any &rRequest)
 
 InteractionRequest ()
 
virtual ~InteractionRequest () override
 

Detailed Description

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

See also
css::ucb::AuthenticationRequest
css::ucb::RememberAuthentication
InteractionAbort
InteractionRetry
InteractionSupplyAuthentication

Definition at line 52 of file simpleauthenticationrequest.hxx.

Member Enumeration Documentation

◆ EntityType

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.

Constructor & Destructor Documentation

◆ SimpleAuthenticationRequest() [1/2]

SimpleAuthenticationRequest::SimpleAuthenticationRequest ( const OUString &  rURL,
const OUString &  rServerName,
const OUString &  rRealm,
const OUString &  rUserName,
const OUString &  rPassword,
bool  bAllowUseSystemCredentials,
bool  bAllowSessionStoring = true 
)

Constructor.

Parameters
rURLcontains a URL for which authentication is requested.
rServerNamecontains a server name.
rRealmcontains a realm, if applicable.
rUserNamecontains a username, if available (for instance from a previous try).
rPasswordcontains a password, if available (for instance from a previous try).
bAllowUseSystemCredentialsspecifies if requesting client is able to obtain and use system credentials for authentication

Definition at line 27 of file simpleauthenticationrequest.cxx.

References initialize().

◆ SimpleAuthenticationRequest() [2/2]

SimpleAuthenticationRequest::SimpleAuthenticationRequest ( const OUString &  rURL,
const OUString &  rServerName,
EntityType  eRealmType,
const OUString &  rRealm,
EntityType  eUserNameType,
const OUString &  rUserName,
EntityType  ePasswordType,
const OUString &  rPassword 
)

Constructor.

Parameters
rServerNamecontains a server name.
eRealmTypespecifies whether a realm is applicable and modifiable.
rRealmcontains a realm, if applicable.
eUserNameTypespecifies whether a username is applicable and modifiable.
rUserNamecontains a username, if available (for instance from a previous try).
ePasswordTypespecifies whether a password is applicable and modifiable.
rPasswordcontains 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().

Member Function Documentation

◆ getAuthenticationSupplier()

const rtl::Reference< ucbhelper::InteractionSupplyAuthentication > & ucbhelper::SimpleAuthenticationRequest::getAuthenticationSupplier ( ) const
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.

Returns
the supplier for the missing authentication data.

Definition at line 132 of file simpleauthenticationrequest.hxx.

◆ initialize()

void SimpleAuthenticationRequest::initialize ( const css::ucb::URLAuthenticationRequest &  rRequest,
bool  bCanSetRealm,
bool  bCanSetUserName,
bool  bCanSetPassword,
bool  bCanSetAccount,
bool  bAllowUseSystemCredentials,
bool  bAllowSessionStoring 
)
private

Member Data Documentation

◆ m_xAuthSupplier

rtl::Reference< ucbhelper::InteractionSupplyAuthentication > ucbhelper::SimpleAuthenticationRequest::m_xAuthSupplier
private

Definition at line 55 of file simpleauthenticationrequest.hxx.

Referenced by initialize().


The documentation for this class was generated from the following files: