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 AdminSession object. 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

adminSession.GetAuthenticationLoginName 

Perl

$adminSession->GetAuthenticationLoginName(); 
Identificateur
Description
adminSession
L'objet AdminSession représentant la session d'accès du référentiel de schéma en cours.
Valeur de retour
A String containing the authentication name used to create this AdminSession.

Exemples

VBScript

set adminSession = CreateObject("ClearQuest.AdminSession") 
adminSession.Logon "admin", "admin", "" 
userLogin = adminSession.GetAuthenticationLoginName
' ...

Perl

use CQPerlExt;
my ($admin_user_login, $admin_pwd, $dbset, $cqusername) = @_;
my $authusername = $admin_user_login;
my $adminSessionObj = CQAdminSession::Build();
$adminSessionObj->Logon($admin_user_login, $admin_pwd, $dbset);
my $loginname = $adminSessionObj->GetUserLoginName();
my $authloginname = $adminSessionObj->GetAuthenticationLoginName();
print "Admin login: $authusername , $authloginname , $cqusername, $loginname \n";
if ($loginname ne $cqusername)
   {
      print "Admin login $loginname != $cqusername!!\n";
   }
if ($authloginname ne $authusername)
   {
      print "Admin authname $authloginname != $authusername!!\n";
   }
CQAdminSession::Unbuild($adminSessionObj);

Commentaires