pitbulk / apps

ownCloud apps
3 stars 5 forks source link

user_cas ok but no autentication in owncloud 5 #5

Closed ghost closed 11 years ago

ghost commented 11 years ago

I have tryed to autenticate owncloud 5 with CAS, the autentication with phpCAS works fine but the user is not autenticated on owncloud...

Owncloud LOG:

{"app":"cas","message":"Not found attribute used to get the username (\"uid\") at the requested cas xml response","level":0,"time":1363815537} {"app":"cas","message":"Error trying to authenticate the user","level":0,"time":1363815537}

ghost commented 11 years ago

I have temporaly resolved with adding this:

$attributes[$this->usernameMapping][0]=phpCAS::getUser();

At line 78 of user_cas.php

pitbulk commented 11 years ago

Hi, @alebot

I could never test the CAS plugin becouse I never had a CAS server.

The change that you proposed is strange.

Can you please say to me an example of what the phpCAS::getAttributes() return?

ghost commented 11 years ago

phpCAS::getAttributes() return only additional attribute that i take from CAS autentication, examples: Groups, Permissions, user detailed information (name, tel, ecc..), not the user name.

The metod that return the username (for the $uid parameter) is phpCAS::getUser();

I'm not an expert of CAS so i could be wrong...

Another problem is on the Logout: if i loguot on owncloud it works perfectly but if a log out from another webapp (authenticated with CAS too) the OwnCloud session remain active.

Sorry for my bad english...

ghost commented 11 years ago

Anyway you have done an excelent work without try anythigs!! awesome!!:)

pitbulk commented 11 years ago

@alebot, maybe is a problem related to configure correctly the SLO in the CAS Server.

Take a look on https://wiki.jasig.org/display/CASUM/Single+Sign+Out

I'm working on the $uid issue and I will commit a fix soon.

pitbulk commented 11 years ago

$uid issue fixed. Now the $uid is the value returned by phpCAS::getUser() Username mapping removed