GetAuthenticationLoginName

Description

Renvoie la chaîne saisie par un utilisateur en tant que nom de connexion, lors de l'authentification. The return value may be different from a Rational ClearQuest user name if the user is LDAP authenticated.

Use the GetUserLoginName method to get the Rational ClearQuest name of the user stored in the user profile record for the user.

Returns the login name used to create the Session. The value returned is the name used to authenticate the user, not the Rational ClearQuest user login field name that is stored in the user profile record for the user. The return value may be a LDAP login name (for example, myname@us.ibm.com) and not a Rational ClearQuest user name (for example, mycqname).

Remarque : This method became available in version 2003.06.14.

Syntaxe

VBScript

session.GetAuthenticationLoginName 

Perl

$session->GetAuthenticationLoginName(); 
Identificateur
Description
session
The session object representing the current access session.
Valeur de retour
A String containing the authentication name used to create this Session.

Exemples

VBScript

mySession.UserLogon "admin", "", dbName, AD_PRIVATE_SESSION, ""

set mySession = CreateObject("ClearQuest.Session") 
mySession.UserLogon "admin", "", dbName, AD_PRIVATE_SESSION, "" 
userLogin = mySession.GetAuthenticationLoginName
' ...

Perl

use CQPerlExt;
my ($login, $pwd, $dbname, $dbset, $cqusername) = @_;
my $authusername = $login;
my $sessionObj = CQSession::Build();
$sessionObj->UserLogon($login, $pwd, $dbname, $dbset);
my $loginname = $sessionObj->GetUserLoginName();
my $authloginname = $sessionObj->GetAuthenticationLoginName();
print "User login: $authusername , $authloginname , $cqusername, $loginname \n";
if ($loginname ne $cqusername)
   {
      print "User login $loginname != $cqusername!!\n";
   }
if ($authloginname ne $authusername)
   {
      print "User authname $authloginname != $authusername!!\n";
   }
CQSession::Unbuild($sessionObj);

Commentaires