wifidog / wifidog-auth-laravel

Rework wifidog-auth by Laravel
https://circleci.com/gh/wifidog/wifidog-auth-laravel
Other
102 stars 40 forks source link

Logout issue #67

Closed xraive closed 3 years ago

xraive commented 3 years ago

First of all thank you for the great work that you're doing. I'm currently testing your project with the wifidog gateway (v. 1.3.0) in DD-WRT. I'm experiencing an issue where when a user tries to logout after a successful login. Eventhough the user is logged out on the web interface they are still able to browse the internet. When I check the status on the wifidog gateway it shows that the client is still connected. I can manually disconnect the client on the gateway using the "wdctl reset" command. I also found that I can logout the user using the following command on the browser.

http://%s:%d/wifidog/auth?logout=1&token=%s", an example would be http://hostname/wifidog/auth?logout=1&token=4f473ae3ddc5c1c2165f7a0973c57a98

I've taken this info from the following site http://dev.wifidog.org/wiki/doc/developer/WiFiDogProtocol_V1.

Any help to resolve this issue would be greatly appreciated.

sinkcup commented 3 years ago

Thanks for your feedback, I find there is no logout in code, maybe I forgot it, I'm writing this feature.

What's the response of curl http://%s:%d/wifidog/auth?logout=1&token=%s?

I need the response to decide: curl or redirect in code.

xraive commented 3 years ago

Thanks for your feedback, I find there is no logout in code, maybe I forgot it, I'm writing this feature.

What's the response of curl http://%s:%d/wifidog/auth?logout=1&token=%s?

I need the response to decide: curl or redirect in code.

I don't know if you need this but this was the result of my curl command. Once again thanks for your work on this, it much appreciated.

curl http://192.168.82.1:2060/wifidog/auth/?logout=1&token=4243dca6119e7657bb44430404c4d7e7a089e312


<html>
<head>
<title>Redirect to login page</title>
<meta HTTP-EQUIV='Pragma' CONTENT='no-cache'>

<style>
body {
  margin: 10px 60px 0 60px;
  font-family : bitstream vera sans, sans-serif;
  color: #46a43a;
}

a {
  color: #46a43a;
}

a:active {
  color: #46a43a;
}

a:link {
  color: #46a43a;
}

a:visited {
  color: #46a43a;
}

#header {
  height: 30px;
  background-color: #B4F663;
  padding: 20px;
  font-size: 20pt;
  text-align: center;
  border: 2px solid #46a43a;
  border-bottom: 0;
}

#header h2 {
  margin: 0pt;
}

#menu {
  width: 200px;
  float: right;
  background-color: #B4F663;
  border: 2px solid #46a43a;
  font-size: 80%;
  min-height: 300px;
}

#menu h2 {
  margin: 0;
  background-color: #46a43a;
  text-align: center;
  color: #B4F663;
}

#copyright {
}

#content {
  padding: 20px;
  border: 2px solid #46a43a;
  min-height: 300px;
}
</style>

</head>

<body>

<div id="header">
    <h2>Redirect to login page</h2>
</div>

<div id="menu">

    <h2>Info</h2>
    <ul>
    <li>Version: @WIFIDOG_VERSION@

    <li>Node ID: default
    </ul>
    <br>

    <h2>Menu</h2>
    <ul>
    <li><a href='/wifidog/status'>WiFiDog Status</a>
    <li><a href='/wifidog/about'>About WiFiDog</a>
    <li><a href='http://www.wifidog.org'>WiFiDog's homepage</a>
    </ul>
</div>

<div id="content">
<h2>Please <a href='http://192.168.2.105:80/login/?gw_address=192.168.82.1&gw_port=2060&gw_id=default&ip=192.168.82.1&url=http%3A%2F%2F192.168.82.1%3A2060%2Fwifidog%2Fauth%2F%3Flogout%3D1'>click here</a>.</h2>
</div>

<div id="copyright">
Copyright (C) 2004-2015.  This software is released under the GNU GPL license.
</div>

</body>
</html>
sinkcup commented 3 years ago

I had finished it, you could update the code or docker, and use it.