Jump to content

Novell Radius


h3ktlk

Recommended Posts

Im authenticating again a Novell Radius Server, This works fine, what i want to do is try to authenticate only certain context's that are in the radius server, but am not sure of the php/radius code to only authenticate the novell context.

 

example 4 context are allowed in the radius:  context.a context.b context.c context.d

 

i just want to allow users in context.c to authenticate on this page.

 

Here is what i have

 

<?php

 

require_once('radius.class.php');

 

?>

 

        <?php

        if ((isset($_POST['user'])) && ('' != trim($_POST['user'])))

        {

            $radius = new Radius('xx.xx.xx.xx', 'xxxxxxxx');

 

            $radius->SetNasIpAddress('xx.xx.xx.xx');

            $radius->SetDebugMode(TRUE);

 

            if ($radius->AccessRequest($_POST['user'], $_POST['pass']))

            {

echo "<strong>Authentication Accepted.</strong>";

 

            }

            else

            {

                echo "<strong>Authentication rejected.</strong>";

            }

            echo "<br />";

 

            echo "<br /><strong>GetReadableReceivedAttributes</strong><br />";

            echo $radius->GetReadableReceivedAttributes();

 

            echo "<br />";

            echo "<a href=\"".$_SERVER['PHP_SELF']."\">Reload authentication form</a>";

        }

        else

        {

            ?>

            <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">

                User: <input name="user" type="text" value="user" />

                <br />

 

                Pass: <input name="pass" type="text" value="pass" /> (text type for educational purpose only) <!-- type="text" for educational purpose only ! -->

                <br />

               

                <input name="submit" type="submit" value="Check authentication" />

            </form>

            <?php

        }

        ?>

Link to comment
https://forums.phpfreaks.com/topic/159085-novell-radius/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.