Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance the CAS client and what it displays #8

Open
mapgrady opened this issue Aug 30, 2016 · 0 comments
Open

Enhance the CAS client and what it displays #8

mapgrady opened this issue Aug 30, 2016 · 0 comments

Comments

@mapgrady
Copy link

mapgrady commented Aug 30, 2016

First, In dockerized-idp-testbed/php-cas/var-www-html/php-cas/index.php, I'd recommend commenting out the line:

phpCAS::setExtraCurlOption( CURLOPT_SSLVERSION, 6 );

so that the default behavior of negotiating protocol happens. And then later, where it displays Success, add the following that would print out all the attributes received from the IdP:

<h1>Successful Authentication!</h1>

<p>the user's login is <b><?php echo phpCAS::getUser(); ?></b>.</p>
<p>phpCAS version is <b><?php echo phpCAS::getVersion(); ?></b>.</p>
<p><a href="/">Main Menu</a></p>
<h3>User Attributes</h3>
 <ul>
<?php
foreach (phpCAS::getAttributes() as $key => $value) {
    if (is_array($value)) {
        echo '<li>', $key, ':<ol>';
        foreach ($value as $item) {
            echo '<li><strong>', $item, '</strong></li>';
        }
        echo '</ol></li>';
    } else {
        echo '<li>', $key, ': <strong>', $value, '</strong></li>' . PHP_EOL;
    }
}
    ?>
</ul>
  </body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant