MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9

AuthPluginInterface Class Reference

Inheritance diagram for AuthPluginInterface:
Inheritance graph
[legend]

List of all members.

Classes

class   Interface
  authentication plugins More...

Public Slots

virtual void  userActionFinished (const SignOn::UiSessionData &data)
  User interaction completed.
virtual void  refresh (const SignOn::UiSessionData &data)
  Refreshes given session.

Signals

void  result (const SignOn::SessionData &data)
  Emitted when authentication process has been completed for given data and there are no errors.
void  store (const SignOn::SessionData &data)
  Emitted when authentication process want to store session data parameters for later use.
void  error (const SignOn::Error &err)
  Emitted when authentication process has been completed for given data and resulting an error.
void  userActionRequired (const SignOn::UiSessionData &data)
  Emitted when authentication process need to interact with user.
void  refreshed (const SignOn::UiSessionData &data)
  Emitted when authentication process has completed refresh request.
void  statusChanged (const AuthPluginState state, const QString &message=QString())
  Emitted to report status of authentication process to signond for informing client application.

Public Member Functions

  AuthPluginInterface (QObject *parent=0)
virtual  ~AuthPluginInterface ()
  Destructor.
virtual QString  type () const =0
  Gets the type of the plugin.
virtual QStringList  mechanisms () const =0
  Gets the list of supported mechanisms.
virtual void  cancel ()
  Requests to cancel the process.
virtual void  abort ()
  Requests to abort the process.
virtual void  process (const SignOn::SessionData &inData, const QString &mechanism=QString())=0
  Process authentication.

Member Function Documentation

virtual void AuthPluginInterface::abort (  )  [inline, virtual]

Requests to abort the process.

Process is terminated after this call. Reimplement this in order to execute specific instructions before process is killed.

virtual void AuthPluginInterface::cancel (  )  [inline, virtual]

Requests to cancel the process.

Process is terminated after this call. Reimplement this in order to execute specific instructions before the effective cancel occurres.

void AuthPluginInterface::error ( const SignOn::Error err  )  [signal]

Emitted when authentication process has been completed for given data and resulting an error.

Parameters:
err  The error object
errorMessage  Resulting error message
virtual QStringList AuthPluginInterface::mechanisms (  )  const [pure virtual]

Gets the list of supported mechanisms.

Returns:
List of mechanisms
virtual void AuthPluginInterface::process ( const SignOn::SessionData inData,
const QString mechanism = QString()  
) [pure virtual]

Process authentication.

Authentication can be logging to a server, obtain token(s) from a server, calculate response using given challenge, etc. Given session data is used to do authentication and return response. Signal result() is emitted when authentication is completed, or signal error() if authentication failed.

See also:
result
error
Parameters:
inData  Input data for authentication
mechanism  Mechanism to use to do authentication
virtual void AuthPluginInterface::refresh ( const SignOn::UiSessionData data  )  [inline, virtual, slot]

Refreshes given session.

Signond uses this slot to refresh data in given ui session. Mostly used to refresh a captcha images during the user interaction. Signal refreshed() or error() must be emitted when refresh is completed. This must be reimplemented to refresh the captcha image.

See also:
UiSessionData
refreshed
Note:
emitting signal userActionRequired() is not allowed to use before ui session is finished.
Parameters:
data  Ui session data to be refreshed
void AuthPluginInterface::refreshed ( const SignOn::UiSessionData data  )  [signal]

Emitted when authentication process has completed refresh request.

Plugin must emit signal refreshed() to response to refresh() call.

See also:
refreshed
Parameters:
data  Refreshed ui session data
void AuthPluginInterface::result ( const SignOn::SessionData data  )  [signal]

Emitted when authentication process has been completed for given data and there are no errors.

Parameters:
data  Resulting SessionData, need to be returned to client
void AuthPluginInterface::statusChanged ( const AuthPluginState  state,
const QString message = QString()  
) [signal]

Emitted to report status of authentication process to signond for informing client application.

Parameters:
state  Plugin process state
See also:
AuthPluginState
Parameters:
message  Optional message for client application
void AuthPluginInterface::store ( const SignOn::SessionData data  )  [signal]

Emitted when authentication process want to store session data parameters for later use.

Stored parameters are added into SessionData in following process calls. This is useful when authentication is using permanent tokens.

Note:
This is shared within same identity using same method only.
There can be storage size limitation for data that can be stored.
Parameters:
data  Resulting SessionData, need to be returned to client
virtual QString AuthPluginInterface::type (  )  const [pure virtual]

Gets the type of the plugin.

Returns:
Plugin type
virtual void AuthPluginInterface::userActionFinished ( const SignOn::UiSessionData data  )  [inline, virtual, slot]

User interaction completed.

Signond uses this slot to notice the end of ui session. This is a response to userActionRequired() signal. This must be reimplemented to get the response from the user interaction.

See also:
UiSessionData
userActionRequired
Parameters:
data  User completed ui session data
void AuthPluginInterface::userActionRequired ( const SignOn::UiSessionData data  )  [signal]

Emitted when authentication process need to interact with user.

Basic use cases are: query password, verify captcha, show url. Can also be used to get username/password for proxy authentication etc. Slot userActionFinished() is called when interaction is completed.

See also:
userActionFinished
SignOn::UiSessionData
Note:
slot userActionFinished() should be reimplemented to get result.
Parameters:
data  Ui session data to be filled within user interaction

Copyright (C) 2009-2011 Nokia Corporation.
LGPL
MeeGo 1.2 Harmattan API