All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

VPMInterfaces Interface CATIVpmSCLogin

System.IUnknown
  |
  +---System.IDispatch
    |
    +---System.CATBaseUnknown
      |
      +---CATIVpmSCLogin
 

Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.


interface CATIVpmSCLogin

CATIVpmSCLogin is one of the Security Management interfaces.

It is used to :

  1. authenticate user against People database.
  2. initialize user's Security profile (privileges, mask, licensing, etc).

Usage Notes:

Example:
 // Suppose the exact role id (format: name.org)is provided there:
 CATUnicodeString sRoleId = a role;
 HRESULT hr = S_OK;
 VPMSession * pSession = VPMSession::OpenSession();
 if (pSession) {
    // Retrieves main factory
    CATIVpmFactoryManager_var vFM;
    if (pSession->getVPMObjectFactory(vFM)==S_OK && !!vFM) {
       // Retrieves security login (extension of factory)
       CATIVpmSCLogin_var vLogin = vFM;
       if (!!vLogin) {
          // Login procedure
          CATUnicodeString          sNone;
          hr = vLogin->Login(sNone, sNone,
                             VPMLoginEXACT_ROLE, sRoleId);
          if (FAILED(hr)) {
            aborting session...
          }
       }
    }
 }

See also:
VPMSession, CATIVpmFactoryManager


Method Index


o GetLoginInfos(CATUnicodeString&,CATUnicodeString&,CATUnicodeString&,CATUnicodeString&,CATUnicodeString&)
Get login informations.
o IsAuthenticated()
Returns database(s) authentication mode.
o Login(CATUnicodeString,CATUnicodeString,VPMLoginPolicy,CATUnicodeString)
Performs the complete login procedure.
o SetLoginParameters(CATListOfCATUnicodeString&,CATListOfCATUnicodeString&)
Set additionnal login parameters.

Methods


o GetLoginInfos
public virtual HRESULT GetLoginInfos(CATUnicodeString& oUserId,
CATUnicodeString& oCtxId,
CATUnicodeString& oCtxRoleId,
CATUnicodeString& oCtxOrgId,
CATUnicodeString& oCtxProjectId) = 0
Get login informations.
Parameters:
oUserId
the current user id
oCtxId
the current context id (format: role.organization.project)
oCtxRoleId
the role id of the current context
oCtxOrgId
the organization id of the current context
oCtxProjectId
the project id of the current context
o IsAuthenticated
public virtual int IsAuthenticated()= 0
Returns database(s) authentication mode.

When database is authenticated (also named SERVER mode), User and Password must be used while connecting to the database, unless the database is using a single connection user (which is the default mode at installation).

Returns:
1 (true) when database is authenticated, 0 otherwise.
o Login
public virtual HRESULT Login(CATUnicodeString iUser,
CATUnicodeString iPwd,
VPMLoginPolicy iRoleChoicePolicy,
CATUnicodeString iRoleName)= 0
Performs the complete login procedure.

See example.

Parameters:
iUser
user name. Not any more used.
iPwd
user password. Not any more used.
iRoleChoicePolicy
enable the role choice strategy.
Enumerated possibilities are : VPMLoginPolicy
iRoleName
role name concatenated to its organization id (separated by a .(dot)).
This argument must be specified with VPMLoginEXACT_ROLE policy.
Returns:
HRESULT value. FAILED when login could not be completed.
o SetLoginParameters
public virtual HRESULT SetLoginParameters(CATListOfCATUnicodeString& iParameterNames,
CATListOfCATUnicodeString& iParameterValues) = 0
Set additionnal login parameters.
Parameters:
iParameterNames
the list of parameter names
iParameterValues
the list os parameter values
Returns:
S_OK if succeeded, S_FALSE in case of error

This object is included in the file: CATIVpmSCLogin.h
If needed, your Imakefile.mk should include the module: GUIDVPMInterfaces

Copyright © 2003, Dassault Systèmes. All rights reserved.