Hi, why not just call in you PHP app https://your-rt-server-url/REST/1.0/ with user and pass as post parameter and check the first line of the response for the status * "200 Ok" = successful login * "401 Credentials required" = not successful login
Chris Am 20.12.2012 12:56, schrieb Scotto Alberto: > Hi all, > > > > I’m writing a PHP application (a cloud self-service application that > lets developers create testing environments and so on) for the company > where I also installed RT. For the authentication part, I thought to > authenticate users against RT, since the users of my PHP app are a > subset of RT’s users. > > So, I’m down to writing a script (attached) that authenticates a user > against RT, to be called from a PHP script. > > On RT I have RT-Authen-ExternalAuth that connects to LDAP. > > So in my perl script I’ve had to make two tries: first > RT::Authen::ExternalAuth::DoAuth (for domain users); then, if it fails, > $user->IsPassword($pass) (for local users). > > The problem is with RT::Authen::ExternalAuth::DoAuth; instead, the auth > of local users with IsPassword always works. > > If I execute the script as root, it goes smooth. > > But for security reasons I want to execute it as another user (I created > the Unix user “selfservice”, as well as the RT user “selfservice”). > Executing the script as this Unix user, DoAuth fails with the following > message: > > > > /ExternalAuthPriority not defined, please check your configuration file./ > > > > What am I missing? > > > > Thank you very much! > > > > Regards > > > > Alberto Scotto >