Hello everybody I hope you are doing good.
I am new at using simplesamlphp and I am having some problems that I can not figure out. I have an application that requires for users to login. For this particular application, I need to allow user to be able to login with a custom database that I created and CAS. I have the custom database provider working. The problem is, when I select to authenticate with CAS. I get redirected to the CAS server and after a successful logging at the CAS server, I get redirected to my application. At my application, I try to get the attributes and I only get an empty array.
On my application
$as = new \SimpleSAML\Auth\Simple('castest');
$as->requireAuth();
$attributes = $as->getAttributes();
print_r($attributes);
die();
this result is an empty array.
Also when I test it on Authentication > Test configured authentication sources > and select castest. This is the result
{
"Attributes": [],
"Authority": "castest",
"AuthnInstant": 1550007903,
"Expire": 1550036703
}
on the authsorce.php, I have this:
I got this form https://simplesamlphp.org/docs/stable/cas:cas
'castest' => array(
'cas:CAS',
'cas' => array(
'login' => 'https://casserver/login.php',
'validate' => 'https://casserver/validate.php',
'logout' => 'http://casserver/logout.php',
),
'ldap' => array(
'servers' => false,
),
),
I tested if CAS returned any attributes to my app using this code
https://github.com/apereo/phpCAS/blob/master/docs/examples/example_advanced_saml11.php
and it does return attributes like mail and others.
How can I access the CAS attributes on my application?
something like this.
{
"Attributes": [
‘mail’ =[
]
],
"Authority": "castest",
"AuthnInstant": 1550007903,
"Expire": 1550036703
}
'serviceValidate' => 'https://server/account/cas/serviceValidate',
'logout' => 'https://server/account/cas/logout',
'attributes' => [
'uid' => '/cas:serviceResponse/cas:authenticationSuccess/cas:user',
'sn' => '/cas:serviceResponse/cas:authenticationSuccess/cas:attributes/cas:lastname',
'givenName' => '/cas:serviceResponse/cas:authenticationSuccess/cas:attributes/cas:firstname',
'mail' => '/cas:serviceResponse/cas:authenticationSuccess/cas:attributes/cas:email',
'customabc' => '/cas:serviceResponse/cas:authenticationSuccess/custom:abc',
]
--
This is a mailing list for users of SimpleSAMLphp, not a support service. If you are willing to buy commercial support, please take a look here:
https://simplesamlphp.org/support
Before sending your question, make sure it is related to SimpleSAMLphp, and not your web server's configuration or any other third-party software. This mailing list cannot help with software that uses SimpleSAMLphp, only regarding SimpleSAMLphp itself.
Make sure to read the documentation:
https://simplesamlphp.org/docs/stable/
If you have an issue with SimpleSAMLphp that you cannot resolve and reading the documentation doesn't help, you are more than welcome to ask here for help. Subscribe to the list and send an email with your question. However, you will be expected to comply with some minimum, common sense standards in your questions. Please read this carefully:
http://catb.org/~esr/faqs/smart-questions.html
---
You received this message because you are subscribed to a topic in the Google Groups "SimpleSAMLphp" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/simplesamlphp/HmaazBp4CBg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to simplesamlph...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.