GetAuthenticationLoginName

Description

Returns the string that a user enters as the login name when authenticating. 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).

Note: This method became available in version 2003.06.14.

Syntax

VBScript

adminSession.GetAuthenticationLoginName 

Perl

$adminSession->GetAuthenticationLoginName(); 
Identifier
Description
adminSession
The AdminSession object representing the current schema repository access session.
Return value
A String containing the authentication name used to create this AdminSession.

Examples

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);